Add ghostty-tmux startup script

This commit is contained in:
Ben Kreeger 2025-06-20 23:18:20 -05:00
parent c3cdfec75a
commit e0159a1440
Signed by: kreeger
GPG Key ID: 1F33DAF2F49E4046
2 changed files with 16 additions and 0 deletions

View File

@ -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
View 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