Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@theel0ja
Created April 21, 2019 19:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theel0ja/3d3c1de607702b87292687d27f99141b to your computer and use it in GitHub Desktop.
Save theel0ja/3d3c1de607702b87292687d27f99141b to your computer and use it in GitHub Desktop.
Tmux on shell login
# https://wiki.archlinux.org/index.php/Tmux#Start_tmux_on_every_shell_login
# https://stackoverflow.com/a/49134974
# https://gist.github.com/theel0ja/3d3c1de607702b87292687d27f99141b
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
# You can replace 0 with the session name you prefer such as "onLogin" (without parenthesis)
[[ -z "$TMUX" ]] && exec tmux new -A -s 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment