Skip to content

Instantly share code, notes, and snippets.

@bitboxx
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitboxx/6208aac359cd5055619c to your computer and use it in GitHub Desktop.
Save bitboxx/6208aac359cd5055619c to your computer and use it in GitHub Desktop.
Shell command to run TMUX on login
#!/bin/bash
# add the following in ~/.config/fish/config.fish
# ~/.run-tmux.sh
# TMUX
if which tmux >/dev/null 2>&1; then
#if not inside a tmux session, and if no session is started, start a new session
test -z "$TMUX" && (tmux -2 attach || tmux -2 new-session)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment