35 lines
367 B
Bash
35 lines
367 B
Bash
|
#!/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
|
||
|
|
||
|
|
||
|
|