several changes
This commit is contained in:
parent
bcda35874d
commit
e83acb54de
11 changed files with 56 additions and 2 deletions
38
rwm_backgroundize.sh
Executable file
38
rwm_backgroundize.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
. $HOME/.wmvar
|
||||
|
||||
FLAG=$1
|
||||
FW=$(pfw) # focused window
|
||||
|
||||
usage() {
|
||||
echo "usage:
|
||||
nowm_ignore.sh [ -i, -u ]
|
||||
-i) ignore focused window
|
||||
-u) open menu and choose the window/s to unignore"
|
||||
}
|
||||
|
||||
case $FLAG in
|
||||
-i) # ignore
|
||||
if [ ! "$(wattr o $(pfw) && echo 1)" ]; then # if override is not set
|
||||
ignw -s $FW # ignore focused window
|
||||
chwb -c $IGNORED $FW # change border color to ignore
|
||||
|
||||
else
|
||||
ignw -r $FW # unignore focused window
|
||||
chwb -c $ACTIVE $FW # change border color to active
|
||||
|
||||
fi
|
||||
;;
|
||||
-u) # unignore
|
||||
if [ -n "$(lsw -o)" ]; then
|
||||
otarget=$(for wid in $(lsw -o); do # override target
|
||||
printf '%s\n' "$wid | $(atomx WM_CLASS $wid) | $(wname $wid)"
|
||||
done | cut -c 1-100 | $XMENU | cut -d ' ' -f 1)
|
||||
ignw -r $otarget # unignore otarget
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
|
@ -3,11 +3,11 @@
|
|||
wew | while read ev wid args; do
|
||||
case $ev in
|
||||
MAP) # focus on mappng requests
|
||||
wattr o $wid || rwm_starship.sh -t
|
||||
wattr o $wid || rwm_mainrole.sh -t
|
||||
;;
|
||||
UNMAP) # focus the top window in the server’s window stack
|
||||
if [ ! "$(pfw)" ]; then
|
||||
rwm_starship.sh -t
|
||||
rwm_mainrole.sh -t
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
16
rwm_wiper.sh
Executable file
16
rwm_wiper.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/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
|
Loading…
Reference in a new issue