big bug fix.
This commit is contained in:
parent
a3a41da807
commit
d461445e27
2 changed files with 14 additions and 10 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
## send windows to desktop background ##
|
||||
## it depends of wms_mainrole.sh ##
|
||||
|
||||
. $HOME/.config/wms/wms_var
|
||||
|
||||
|
|
|
@ -26,17 +26,20 @@ name() {
|
|||
# create atom in focused window
|
||||
add_focused() {
|
||||
if [ -n "name" ]; then
|
||||
atomx WM_HERD="$(name)_$FW" $FW
|
||||
atomx WM_HERD="$(name) $FW" $FW
|
||||
fi
|
||||
}
|
||||
|
||||
# create atom in all maped windows
|
||||
add_all() {
|
||||
if [ -n "name" ]; then
|
||||
for wid in $(lsw); do
|
||||
atomx WM_HERD="$(name)_$wid" $wid
|
||||
done
|
||||
fi
|
||||
name=$(printf $(name))
|
||||
for wid in $AMW; do
|
||||
if [ -n "$name" ]; then
|
||||
atomx WM_HERD="$name $wid" $wid
|
||||
else
|
||||
atomx WM_HERD="no_name $wid" $wid
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# delete atom from focused window
|
||||
|
@ -50,12 +53,12 @@ del_all() {
|
|||
|
||||
# togle groups
|
||||
togle() {
|
||||
herds=$(atomx WM_HERD $(lsw -a) | cut -d '_' -f1 | sort -u) # herds
|
||||
herds=$(atomx WM_HERD $(lsw -a) | cut -d ' ' -f1 | sort -u) # herds
|
||||
if [ -n "$herds" ]; then # check if any herd exist
|
||||
h_target=$(printf "$herds" | $XMENU) # select herd target
|
||||
map_wind=$(atomx WM_HERD $(lsw -u) | grep $h_target | cut -d '_' -f2) # windows to map
|
||||
unmap_wind=$(atomx WM_HERD $(lsw) | grep -v $h_target | cut -d '_' -f2) # windows to unmap
|
||||
mapw -m $map_wind & mapw -u $unmap_wind
|
||||
wind_to_map=$(atomx WM_HERD $(lsw -u) | grep $h_target | cut -d ' ' -f2) # windows to map
|
||||
wind_to_unmap=$(atomx WM_HERD $(lsw) | grep -v $h_target | cut -d ' ' -f2) # windows to unmap
|
||||
mapw -m $wind_to_map & mapw -u $wind_to_unmap
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue