wms/opt/wms_toggle.sh

42 lines
459 B
Bash
Raw Normal View History

2024-02-26 05:32:24 +01:00
#!/bin/sh
## toggle visivility of windows ##
# wms_toggle.sh by @root_informatica.
FLAG=$1
2024-06-28 20:31:39 +02:00
usage() {
cat<<EOF
usage: wms_toggle.sh [ -m, -t ]
-m) unmap windowblur.sh
-t) toggle map.
EOF
}
2024-02-26 05:32:24 +01:00
unmap() {
atomx WM_MAP="$FW" $FW
mapw -u $FW
}
toggle() {
for wid in $(lsw); do
atomx WM_MAP="$wid" $wid
done
mapw -t $(atomx WM_MAP $(lsw -a))
}
case $FLAG in
-m)
unmap
;;
-t)
toggle
;;
*)
usage
;;
esac