diff options
Diffstat (limited to 'home/profiles/zsh/tmux.zsh')
-rw-r--r-- | home/profiles/zsh/tmux.zsh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/home/profiles/zsh/tmux.zsh b/home/profiles/zsh/tmux.zsh new file mode 100644 index 0000000..97944f5 --- /dev/null +++ b/home/profiles/zsh/tmux.zsh @@ -0,0 +1,9 @@ +# If we're not in an ssh connection, and tmux is installed, and we're +# not already in a tmux session, attach to the session named +# 'default', and if the session does not exist, start one named +# 'default' +if [ -z "$SSH_CONNECTION" ]; then + if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then + tmux attach -t default || tmux new -s default + fi +fi |