diff options
Diffstat (limited to '.local/bin/scripts/scratchpad')
| -rwxr-xr-x | .local/bin/scripts/scratchpad | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.local/bin/scripts/scratchpad b/.local/bin/scripts/scratchpad new file mode 100755 index 0000000..2192236 --- /dev/null +++ b/.local/bin/scripts/scratchpad @@ -0,0 +1,41 @@ +#!/usr/bin/bash + +# Created By: srdusr +# Created On: Wed 18 Jan 2023 11:15:22 PM CAT +# Project: bspwm scratchpad with tmux session + +id=$(xdo id -n scratchpad); +if [ -z "$id" ]; then + wezterm start --class scratchpad -e tmux new-session -A -s tmux -e bash > /dev/null 2>&1 & +else + bspc node "$id" -g hidden -f +fi + +#- - - - - - - - - - + + +### Other Window Managers + +#id=$(xdotool search --class scratchpad); +#if [ -z "$id" ]; then +# wezterm start --class scratchpad -e tmux new-session -A -s scratch -e bash > /dev/null 2>&1 & +#else +# if [ ! -f /tmp/scratchpad ]; then +# touch /tmp/scratchpad && xdo hide "$id" +# elif [ -f /tmp/scratchpad ]; then +# rm /tmp/scratchpad && xdo show "$id" +# fi +#fi + +#- - - - - - - - - - + + +### Alacritty alternative + +#if id="$(xdo id -N scratch)" +# then bspc node "$id" -g hidden -f +# else alacritty --class scratch,scratchpad -e tmux new-session -A -s scratch -e bash > /dev/null 2>&1 & +#fi + +#- - - - - - - - - - + |
