Stop setting tmux config from prezto
This commit is contained in:
parent
bb76902ac0
commit
72ecdfddfc
2 changed files with 5 additions and 11 deletions
|
@ -20,8 +20,8 @@ following line to *zpreztorc*:
|
||||||
|
|
||||||
zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||||
|
|
||||||
In both cases, it will create a background session named _#Prezto_ and attach
|
In both cases, it will create a background session named _prezto_ if the tmux
|
||||||
every new shell to it.
|
server is not started.
|
||||||
|
|
||||||
__Note__: With `auto-start` enabled, you may want to control how multiple
|
__Note__: With `auto-start` enabled, you may want to control how multiple
|
||||||
sessions are managed. The `destroy-unattached` option of tmux controls if the
|
sessions are managed. The `destroy-unattached` option of tmux controls if the
|
||||||
|
|
|
@ -23,18 +23,12 @@ if [[ -z "$TMUX" && ( -z "$INSIDE_EMACS" || -z "$EMACS" || -z "$VIM" ) ]] && ( \
|
||||||
); then
|
); then
|
||||||
tmux_session='prezto'
|
tmux_session='prezto'
|
||||||
|
|
||||||
# Create the default '#Prezto' session if not available.
|
# Create a first 'prezto' session if tmux is starting.
|
||||||
if ! tmux has-session -t "$tmux_session" 2> /dev/null; then
|
if ! tmux has-session 2> /dev/null; then
|
||||||
tmux start-server \; new-session -d -s "$tmux_session" \; set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
tmux start-server \; new-session -d -s "$tmux_session" \; set-option -t "$tmux_session" destroy-unattached off &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#By default, prezto sets destroy-unattached to on
|
#Opens the session 'prezto' or the latest session used
|
||||||
tmux_destroy_unattached=`tmux show-options -v -g destroy-unattached`
|
|
||||||
if [[ -z "$tmux_destroy_unattached" ]]; then
|
|
||||||
tmux set-option -g destroy-unattached on
|
|
||||||
fi
|
|
||||||
|
|
||||||
#Opens the session '#Prezto' or the latest session used
|
|
||||||
exec tmux attach-session
|
exec tmux attach-session
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue