code improvements

This commit is contained in:
#root_informatica 2023-09-26 01:25:05 -03:00
parent a843bd1c1d
commit 04b5df8022
6 changed files with 28 additions and 2 deletions

7
wms_clock.sh Executable file
View File

@ -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"

5
wms_launcher.sh Executable file
View File

@ -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'

5
wms_menu.sh Executable file
View File

@ -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"

View File

@ -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

5
wms_term.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
. $HOME/.config/wms/wms_var
xterm -bc -ti -vt340 -bg "#$BC"

View File

@ -16,9 +16,10 @@ WMSVAR="/tmp/wms_var" # variable temporary file
usage() {
cat<<EOF
usage:
wms_revalue.sh [ -b, -B, -g, -G, -m, -M, -w, -W]
wms_revalue.sh [ -b, -B, -d, -g, -G, -m, -M, -w, -W]
-b) minimize borderwidth
-B) maximize borderwidth
-d) load default
-g) minimize gaps
-G) maximize
-m) minimize tiling master area
@ -92,6 +93,9 @@ if [ -n "$FLAG" ]; then
-B) # increase border width
border_inc
;;
-d) # load defaults
cp $HOME/.config/wms/wms_var /tmp/wms_var
;;
-g) # decrease gaps
gap_dec
;;