瀏覽代碼

Load local config before starting tmux

makes custom tmux installs possible, also attach session if possible
instead of recreateing everytime
Kevin Heinicke 8 年之前
父節點
當前提交
7da603afeb
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      zshrc

+ 5 - 5
zshrc

@@ -1,12 +1,12 @@
-# instantaneously start tmux, if available
-if command -v tmux>/dev/null; then
-  [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux
-fi
-
 # Device-specifig setup (ignored by git)
 # source local config first to overwrite default theme if wanted
 source ~/.zsh_local
 
+# instantaneously start tmux, if available
+if command -v tmux>/dev/null; then
+  [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux new-session -A -s main
+fi
+
 # Source Prezto.
 if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
   source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"