diff options
Diffstat (limited to 'dotfiles/common/.profile.d/auto-tmux-session.sh')
| -rw-r--r-- | dotfiles/common/.profile.d/auto-tmux-session.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dotfiles/common/.profile.d/auto-tmux-session.sh b/dotfiles/common/.profile.d/auto-tmux-session.sh new file mode 100644 index 0000000..cd39fab --- /dev/null +++ b/dotfiles/common/.profile.d/auto-tmux-session.sh @@ -0,0 +1,8 @@ +# auto-tmux-session.sh +# Craig Jennings <c@cjennings.net> +# Start tmux automatically when connecting via SSH + +if [ -z "$TMUX" ] && [ -n "$SSH_CONNECTION" ]; then + export TERM="xterm-mono" + tmux attach-session -t "$USER" || tmux new-session -s "$USER" +fi |
