code change
This commit is contained in:
parent
9fdf2628b5
commit
e4cedb8814
2 changed files with 13 additions and 40 deletions
|
@ -127,8 +127,8 @@ super + {_,shift + }z
|
|||
############################
|
||||
|
||||
# clear desktop #
|
||||
super + c
|
||||
rwm_clearer.sh
|
||||
super + {_,shift +}c
|
||||
rwm_clearer.sh {-c,-u}
|
||||
|
||||
## backgroundize ##
|
||||
super + {_,shift +}b
|
||||
|
@ -146,9 +146,9 @@ super + space
|
|||
super + {n,p}
|
||||
rwm_mainrole.sh {-n,-p}
|
||||
|
||||
# move ##
|
||||
super + {l,h,j,k}
|
||||
rwm_moveresize.sh {-r,-l,-d,-u}
|
||||
# move ##
|
||||
super + {l,h,j,k}
|
||||
rwm_moveresize.sh {-r,-l,-d,-u}
|
||||
|
||||
# resize ##
|
||||
super + shift + {l,h,j,k}
|
||||
|
|
|
@ -5,44 +5,17 @@
|
|||
. $HOME/.config/rootwm/rwm_var
|
||||
|
||||
FLAG=$1
|
||||
FW=$(pfw) # focused window
|
||||
CL=$(atomx WM_CL $FW) # clearrer atom
|
||||
FW=$(pfw) # focused window
|
||||
CL=$(atomx WM_CL $FW) # clearrer atom
|
||||
UW=$(atomx WM_CL $(lsw -u)) # unmaped windows
|
||||
|
||||
usage() {
|
||||
echo "usage:
|
||||
rwm_clearer.sh [ -c, -r ]
|
||||
-c) clear desktop
|
||||
-r) restore windows"
|
||||
}
|
||||
if [ -n "$UW" ]; then # if unmaped windows
|
||||
mapw -m $UW # map them
|
||||
atomx -d WM_CL $UW # create atom
|
||||
|
||||
clear() {
|
||||
if [ -n $FW ]; then
|
||||
else # if no unmaped windows
|
||||
for wid in $(lsw); do
|
||||
atomx WM_CL=$wid $wid
|
||||
mapw -u $wid
|
||||
done
|
||||
done # unmap the maped windows
|
||||
fi
|
||||
}
|
||||
|
||||
restore() {
|
||||
map_wind=$(atomx WM_CL $(lsw -u))
|
||||
if [ -n "$map_wind" ]; then
|
||||
mapw -m $map_wind
|
||||
atomx -d WM_CL $map_wind
|
||||
fi
|
||||
}
|
||||
|
||||
case $FLAG in
|
||||
-c)
|
||||
clear
|
||||
;;
|
||||
-u)
|
||||
restore
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue