Skip to content

Commit f01da48

Browse files
committed
feat(ghostty-tmux): add smart tmux wrapper script
Launch tmux only on first Ghostty instance, avoiding nested tmux sessions. Remove direct tmux command from Ghostty config in favor of the wrapper approach.
1 parent bb90638 commit f01da48

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

dot_config/ghostty/config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ keybind = alt+h=goto_split:left
5555
keybind = alt+j=goto_split:down
5656
keybind = alt+k=goto_split:up
5757
keybind = alt+l=goto_split:right
58-
command = tmux attach || tmux

dot_config/niri/dms/binds.kdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ binds {
1111
Mod+Shift+Slash { show-hotkey-overlay; }
1212

1313
// === Application Launchers ===
14-
Mod+T hotkey-overlay-title="Open Terminal" { spawn "ghostty"; }
14+
Mod+T hotkey-overlay-title="Open Terminal" { spawn "sh" "-c" "$HOME/.local/bin/ghostty-tmux.sh"; }
1515
Mod+D hotkey-overlay-title="Application Launcher" {
1616
spawn "dms" "ipc" "call" "spotlight" "toggle";
1717
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if pgrep -x "ghostty" >/dev/null; then
4+
ghostty &
5+
else
6+
ghostty -e sh -c "tmux attach || tmux" &
7+
fi

0 commit comments

Comments
 (0)