diff --git a/.bin/sp b/.bin/sp index 66fc694..fcc1f81 100755 --- a/.bin/sp +++ b/.bin/sp @@ -17,7 +17,7 @@ WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1) if [ -z "$WID" ] 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) else # check if window is iconfified or on another WS (or both) @@ -33,15 +33,7 @@ else else # window is visible => hide wmctrl -i -r $WID -b add,hidden + # correct size while hidden + wmctrl -i -r $WID -e 0,$GAP,$GAP,$H,$V fi - # wmctrl -i -r $WID -e 0,200,200,1420,680 - wmctrl -i -r $WID -e 0,$GAP,$GAP,$H,$V 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