-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev
More file actions
36 lines (26 loc) · 852 Bytes
/
Copy pathdev
File metadata and controls
36 lines (26 loc) · 852 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
export PATH="$HOME/.local/bin:$PATH"
WS_CODE=2
WS_OPS=3
WS_WEB=4
CURRENT_WINDOW=$(
i3-msg -t get_tree |
jq '.. | objects | select(.focused == true) | .id'
)
# Move the current Ghostty to workspace 3.
i3-msg "[con_id=$CURRENT_WINDOW] move container to workspace number $WS_OPS"
# Start Firefox only if it isn't already running.
if ! pgrep -x firefox >/dev/null; then
firefox >/dev/null 2>&1 &
fi
# Move Firefox to workspace 4.
i3-msg '[class="firefox"] move container to workspace number 4'
# Switch to workspace 2.
i3-msg "workspace number $WS_CODE"
# Open a new Emacs frame (same command as your i3 binding).
emacsclient -c -a 'emacs' >/dev/null 2>&1 &
# Keep focus on workspace 2.
i3-msg "workspace number $WS_CODE"
# Replace this shell with the tmux sessionizer.
exec tmux-sessionizer