prevent double tmux

This commit is contained in:
2025-04-12 21:21:35 +02:00
parent b1d520d666
commit 9aafef9ba3

View File

@@ -9,11 +9,11 @@ cd /opt/homebrew/bin
[[ -f "$HOME/.dotfiles/aliases" ]] && source "$HOME/.dotfiles/aliases" [[ -f "$HOME/.dotfiles/aliases" ]] && source "$HOME/.dotfiles/aliases"
[[ -f "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh" [[ -f "$HOME/.iterm2_shell_integration.zsh" ]] && source "$HOME/.iterm2_shell_integration.zsh"
if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then #if [ ! "$TERM_PROGRAM" = "iTerm.app" ]; then
if [ -z "$TMUX" ]; then # if [ -z "$TMUX" ]; then
(tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main # (tmux ls | grep -vq attached && tmux -2 attach-session -t main) || tmux -2 new-session -s main
fi # fi
fi #fi
# use ~/.commonrc.local for local changes, proxy etc. # use ~/.commonrc.local for local changes, proxy etc.
[[ -f "$HOME/.commonrc.local" ]] && source "$HOME/.commonrc.local" [[ -f "$HOME/.commonrc.local" ]] && source "$HOME/.commonrc.local"