dotfiles/.bin/sp

18 lines
400 B
Plaintext
Raw Normal View History

2023-01-07 21:45:05 +01:00
#!/bin/sh -x
# set the following quirk in .config/spectrwm/spectrwm.conf
# quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
if [ -z "$WID" ]
then
st -c scratchpad -g 128x38+250+150 &
else
wmctrl -i -r $WID -b toggle,hidden
if xwininfo -id 0x01800005 | fgrep -q IsViewable
then
wmctrl -i -R $WID
fi
fi