Skip to content

Instantly share code, notes, and snippets.

@algesten
Created May 14, 2017 07:59
Show Gist options
  • Save algesten/b1dae6873f8dcfec87c7ea8502cff8ed to your computer and use it in GitHub Desktop.
Save algesten/b1dae6873f8dcfec87c7ea8502cff8ed to your computer and use it in GitHub Desktop.
start tmux in bashrc
# TMUX
# test if tmux is available
if type tmux >/dev/null 2>&1; then
# if not inside a tmux session, and if no session is started, start a new session
# I only want this on my mac laptop.
if [ -z "$TMUX" -a `uname` == Darwin ]; then
# attach to session "martin" if there
exec tmux -2 -f ~/.tmux-osx.conf new-session -A -s martin
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment