Update 2023-11-02 22:16 OpenBSD/amd64-x13
This commit is contained in:
parent
3ad43fe7ae
commit
909effc8af
14
.bin/sp
14
.bin/sp
|
@ -17,7 +17,7 @@ WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
|
||||||
|
|
||||||
if [ -z "$WID" ]
|
if [ -z "$WID" ]
|
||||||
then
|
then
|
||||||
sterm -c scratchpad -g 160x42+130+80 &
|
sterm -c scratchpad -g 161x38+$GAP+$GAP &
|
||||||
WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
|
WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
|
||||||
else
|
else
|
||||||
# check if window is iconfified or on another WS (or both)
|
# check if window is iconfified or on another WS (or both)
|
||||||
|
@ -33,15 +33,7 @@ else
|
||||||
else
|
else
|
||||||
# window is visible => hide
|
# window is visible => hide
|
||||||
wmctrl -i -r $WID -b add,hidden
|
wmctrl -i -r $WID -b add,hidden
|
||||||
|
# correct size while hidden
|
||||||
|
wmctrl -i -r $WID -e 0,$GAP,$GAP,$H,$V
|
||||||
fi
|
fi
|
||||||
# wmctrl -i -r $WID -e 0,200,200,1420,680
|
|
||||||
wmctrl -i -r $WID -e 0,$GAP,$GAP,$H,$V
|
|
||||||
fi
|
fi
|
||||||
c=0
|
|
||||||
while [ -z $WID ] && [ $c -lt 10 ]
|
|
||||||
do
|
|
||||||
WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
|
|
||||||
c=$(( $c + 1 ))
|
|
||||||
sleep 0.1
|
|
||||||
done
|
|
||||||
wmctrl -i -r $WID -e 0,$GAP,$GAP,$H,$V
|
|
||||||
|
|
Loading…
Reference in New Issue