wms/rwm_clearer.sh
rootniformaticaservice e4cedb8814 code change
2023-03-17 16:19:07 -03:00

21 lines
475 B
Bash
Executable file

#!/bin/sh
## clean screen ##
. $HOME/.config/rootwm/rwm_var
FLAG=$1
FW=$(pfw) # focused window
CL=$(atomx WM_CL $FW) # clearrer atom
UW=$(atomx WM_CL $(lsw -u)) # unmaped windows
if [ -n "$UW" ]; then # if unmaped windows
mapw -m $UW # map them
atomx -d WM_CL $UW # create atom
else # if no unmaped windows
for wid in $(lsw); do
atomx WM_CL=$wid $wid
mapw -u $wid
done # unmap the maped windows
fi