wms/wms_clearer.sh
rootniformaticaservice 2cce073ed4 tiny repairs.
2023-04-03 00:29:42 -03:00

22 lines
527 B
Bash
Executable file

#!/bin/sh
## clean screen ##
. $HOME/.config/wms/wms_var
FLAG=$1
FW=$(pfw) # focused window
CL=$(atomx WM_CL $FW) # clearrer atom
AMW=$(lsw) # all maped windows
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 # delete atom
else # if no unmaped windows
for wid in $(lsw); do
atomx WM_CL=$wid $wid
done # create atom
mapw -u $AMW # unmap windows
fi