Add scratchpad for spectrwm

This commit is contained in:
c0dev0id 2023-01-07 21:45:05 +01:00
parent b7bb393834
commit ad214c1050
2 changed files with 19 additions and 2 deletions

17
.bin/sp Executable file
View File

@ -0,0 +1,17 @@
#!/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

View File

@ -32,7 +32,7 @@ stack_mark_max = ''
# Custom Quirks
quirk[IPMIView20-IPMIView20:IPMIView20-IPMIView20] = FLOAT + ANYWHERE
quirk[scratchpad] = FLOAT + ANYWHERE
quirk[scratchpad] = FLOAT + ANYWHERE + FOCUSPREV
quirk[Nsxiv:tabbed] = NOFOCUSONMAP + FOCUSPREV
# Window Manager Keys
@ -54,7 +54,7 @@ bind[exec] = MOD+D
program[ssh] = dexec_ssh
bind[ssh] = MOD+S
program[scratchpad] = scratchpad
program[scratchpad] = sp
bind[scratchpad] = MOD+minus
program[apps] = dexec_apps