17 lines
487 B
Bash
17 lines
487 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
. $HOME/.config/rootwm/rwm_var
|
||
|
|
||
|
CWL="/tmp/nowm_cwl" # cleared windows list
|
||
|
CWLD=$(cat $CWL | grep "$(lsw -u)") # difference between CWL and currently unmapped windows.
|
||
|
|
||
|
if [ -f $CWL ]; then # if CWL file exist
|
||
|
mapw -m $CWLD # restore windows that have not been mapped yet
|
||
|
rm $CWL # remove CWL file
|
||
|
|
||
|
else # if CWL file not exist
|
||
|
lsw > $CWL # create file with maped windows
|
||
|
mapw -u $(lsw) # clear desktop
|
||
|
|
||
|
fi
|