only start tmux on tty

I still need to work on the tmux config, it's still pretty annoying. I'm
just not exactly sure on what I want to do yet.
This commit is contained in:
foreverpyrite
2025-09-28 21:20:39 -05:00
parent c17f441e5f
commit 553218aa5f

View File

@@ -40,9 +40,15 @@ starship init fish | source
# --- Forcing Tmux Upon Thyself ---
# I keep doing all these things with tmux and looking at tpm plugins,
# yet for some reason I'm not always using it
#
# Should only activate in a terminal emulator though, since it starting
# with the env of the tty instead of the wayland session is really
# annoying tbh
if tty | string match --quiet --regex '^/dev/tty[0-9]+$'
# Making it a varible just in case I wanna change it some day
set DEFAULT_SESSION home
if status is-interactive && not set -q TMUX
tmux attach -t $DEFAULT_SESSION || tmux new-session -s $DEFAULT_SESSION
end
end