wms/opt/wms_toggle.sh

35 lines
367 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
FW=$(pfw)
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