Skip to content

Instantly share code, notes, and snippets.

@Wes974
Forked from theel0ja/tmux_on_login.sh
Created March 8, 2020 18:47
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 Wes974/92a7a19c41a114bdad4146c4d5f56ed3 to your computer and use it in GitHub Desktop.
Save Wes974/92a7a19c41a114bdad4146c4d5f56ed3 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