From 553218aa5f703d5d499b09d45a4d76fe080b8866 Mon Sep 17 00:00:00 2001 From: foreverpyrite <51493121+ForeverPyrite@users.noreply.github.com> Date: Sun, 28 Sep 2025 21:20:39 -0500 Subject: [PATCH] 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. --- fish/.config/fish/config.fish | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index f83cbdc..31b791f 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -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 -# 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 +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