aboutsummaryrefslogtreecommitdiff
path: root/scratchpad
blob: 21922364d023cc9f275fafa4fb51932d77740b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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

#- - - - - - - - - -