dotfiles/.bin/OLD/scratchpad.tabbed
2024-02-14 07:55:58 +01:00

13 lines
325 B
Bash
Executable File

#!/bin/sh
[ ! -f /tmp/scratchpad ] && echo invalid > /tmp/scratchpad
WID="$(cat /tmp/scratchpad | sed 's/0x//g')"
if wmctrl -l | fgrep -q "${WID}";
then
wmctrl -i -R 0x${WID} -b toggle,hidden,above,sticky
else
WID=$(tabbed -c -d -n scratchpad -g 1280x768+300+120 -r 2 st -w '')
echo ${WID} > /tmp/scratchpad
fi