Add ghostty-tmux startup script
This commit is contained in:
parent
c3cdfec75a
commit
e0159a1440
@ -20,6 +20,7 @@ scrollback-limit = 10000
|
||||
window-inherit-working-directory = true
|
||||
copy-on-select = clipboard
|
||||
shell-integration-features = no-cursor
|
||||
command = ~/.config/ghostty/ghostty-tmux
|
||||
|
||||
# macOS-specific settings
|
||||
alpha-blending = linear
|
||||
|
||||
15
ghostty/ghostty-tmux
Executable file
15
ghostty/ghostty-tmux
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SESSION_NAME="ghostty"
|
||||
|
||||
# Check if the session already exists
|
||||
tmux has-session -t "$SESSION_NAME" 2>/dev/null
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
# If the session exists, reattach to it
|
||||
tmux attach-session -t "$SESSION_NAME"
|
||||
else
|
||||
# If the session doesn't exist, start a new one
|
||||
tmux new-session -s "$SESSION_NAME" -d
|
||||
tmux attach-session -t "$SESSION_NAME"
|
||||
fi
|
||||
Loading…
x
Reference in New Issue
Block a user