blob: a4010454ecd4318adff2a0423c2ad05d75a267cb (
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
|
#!/bin/sh
# Created By: srdusr
# Created On: Wed 05 Feb 2023 01:24:37 AM CAT
# Project: bspwm scratchpad (Heads-Up-Display) with tmux session
if id="$(xdo id -N heads-up-display)"; then
bspc node "$id" -g hidden -f
else
#kitty --class "heads-up-display" -e tmux new-session -A -s HUD -e bash >/dev/null 2>&1 &
wezterm start --class "heads-up-display" -e tmux new-session -A -s HUD -e bash >/dev/null 2>&1 &
fi
#- - - - - - - - - -
### Alternative method
#id=$(xdotool search --class Heads-Up-Display);
#if [ -z "$id" ]; then
# #kitty --class "Heads-Up-Display" -e tmux new-session -A -s HUD -e bash > /dev/null 2>&1 &
# alacritty --class "Heads-Up-Display" -e tmux new-session -A -s HUD -e bash > /dev/null 2>&1 &
#else
# if [ ! -f /tmp/hide_hud ]; then
# touch /tmp/hide_hud && xdo hide "$id"
# elif [ -f /tmp/hide_hud ]; then
# rm /tmp/hide_hud && xdo show "$id"
# fi
#fi
|