disable tmux autoattach settings

This commit is contained in:
c0de 2021-01-17 19:26:12 -06:00
parent c737eed848
commit 1f09988864

View File

@ -25,20 +25,20 @@ export DISABLE_DOTFILES_UPDATE_PROMPT=false
export UPDATE_DOTFILES_DAYS=13 export UPDATE_DOTFILES_DAYS=13
# Whether or not to automatically connect to a TMUX session when opening the shell # Whether or not to automatically connect to a TMUX session when opening the shell
export ENABLE_TMUXAC=false #export ENABLE_TMUXAC=false
# If there is not an active tmux session, we probably want one # If there is not an active tmux session, we probably want one
# Otherwise, the shell will not open the session again (eg. opening tabs, new terminals) # Otherwise, the shell will not open the session again (eg. opening tabs, new terminals)
if $(tmux list-sessions >> /dev/null 2>&1); then #if $(tmux list-sessions >> /dev/null 2>&1); then
export TMUXATT=true # export TMUXATT=true
else #else
export TMUXATT=false # export TMUXATT=false
fi #fi
# Automatically attach tmux session "C0DE" # Automatically attach tmux session "C0DE"
if [[ -z "$TMUX" && "$TMUXATT" && "$ENABLE_TMUXAC" ]]; then #if [[ -z "$TMUX" && "$TMUXATT"==true && "$ENABLE_TMUXAC"==true ]]; then
tmux attach -t C0DE || tmux new -s C0DE # tmux attach -t C0DE || tmux new -s C0DE
fi #fi
# Enable shell-history for interactive shells # Enable shell-history for interactive shells
# https://github.com/pawamoy/shell-history # https://github.com/pawamoy/shell-history