From 04b5df8022836132993c23e2a5ec2863098c7446 Mon Sep 17 00:00:00 2001 From: root_sti Date: Tue, 26 Sep 2023 01:25:05 -0300 Subject: [PATCH] code improvements --- wms_clock.sh | 7 +++++++ wms_launcher.sh | 5 +++++ wms_menu.sh | 5 +++++ wms_mimic.sh | 2 +- wms_term.sh | 5 +++++ wms_value.sh | 6 +++++- 6 files changed, 28 insertions(+), 2 deletions(-) create mode 100755 wms_clock.sh create mode 100755 wms_launcher.sh create mode 100755 wms_menu.sh create mode 100755 wms_term.sh diff --git a/wms_clock.sh b/wms_clock.sh new file mode 100755 index 0000000..a8b1454 --- /dev/null +++ b/wms_clock.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. $HOME/.config/wms/wms_var + +FONT=$(cat .Xresources | grep XTerm.faceName | cut -d ' ' -f 2) + +xclock -d -brief -fg "#$AC" -bg "#$BC" -face "$FONT:bold:size=70" diff --git a/wms_launcher.sh b/wms_launcher.sh new file mode 100755 index 0000000..c0fb4d5 --- /dev/null +++ b/wms_launcher.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +. $HOME/.config/wms/wms_var + +$TERMINAL -name 'xlauncher' -g $GEOMETRY -bg "#$BC" -e bash -c 'cmd=$(compgen -c | sort -u | grep -v fzf | fzf --bind 'ctrl-e:print-query' --no-sort); setsid -f $cmd' diff --git a/wms_menu.sh b/wms_menu.sh new file mode 100755 index 0000000..68a4f94 --- /dev/null +++ b/wms_menu.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +. $HOME/.config/wms/wms_var + +$TERMINAL -name "xmenu" -g $GEOMETRY -bg "#$BC" -e "fzf --bind 'ctrl-e:print-query' --no-sort $* < /proc/$$/fd/0 > /proc/$$/fd/1" diff --git a/wms_mimic.sh b/wms_mimic.sh index d33563c..37c4918 100755 --- a/wms_mimic.sh +++ b/wms_mimic.sh @@ -7,7 +7,7 @@ NC="3" # number of colors to extract # color extractor colext() { - convert $TARGET -colors $NC -depth 6 -format '%c' histogram:info:- | awk -v RS="" '{print $11,$7,$3}' | tr -d '#' + convert $TARGET -colors $NC -depth 6 -format '%c' -alpha off histogram:info:- | awk -v RS="" '{print $11,$7,$3}' | tr -d '#' } # if the image file exists, extract the colors and store them temporarily diff --git a/wms_term.sh b/wms_term.sh new file mode 100755 index 0000000..3a8cb2f --- /dev/null +++ b/wms_term.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +. $HOME/.config/wms/wms_var + +xterm -bc -ti -vt340 -bg "#$BC" diff --git a/wms_value.sh b/wms_value.sh index a3c4ee3..9732ac6 100755 --- a/wms_value.sh +++ b/wms_value.sh @@ -16,9 +16,10 @@ WMSVAR="/tmp/wms_var" # variable temporary file usage() { cat<