Permalink
Browse files

better auto-renamed for tmux

  • Loading branch information...
1 parent cca9f37 commit 656f050ba06c493a079633aa48754cf630571ce6 @morhekil committed Mar 17, 2012
Showing with 29 additions and 23 deletions.
  1. +1 −0 tmux.conf
  2. +25 −23 zsh/includes/S60_prompt
  3. +3 −0 zsh/zshrc
View
@@ -18,3 +18,4 @@ bind-key C-y run "tmux show-buffer | xclip -i"
## ---> OS X
# using reattach-wrapper to give tmux access to system clipboard
set-option -g default-command "reattach-to-user-namespace -l zsh"
+set-option -g automatic-rename on
View
@@ -82,29 +82,31 @@ unset rst bgc
# ------------------------------
# http://dotfiles.org/~frogb/.zshrc
-case $TERM in
- xterm* | rxvt* | urxvt*)
- precmd() {
- print -Pn "\e]0;%n@%m: %~\a"
- }
- preexec() {
- #print -Pn "\e]0;$1\a"
- print -Pn "\e]0;%n@%m: %~ $1\a"
- }
- ;;
- screen*)
- precmd() {
- print -nR $'\033k'"zsh"$'\033'\\\
-
- print -nR $'\033]0;'"zsh"$'\a'
- }
- preexec() {
- print -nR $'\033k'"$1"$'\033'\\\
-
- print -nR $'\033]0;'"$1"$'\a'
- }
- ;;
-esac
+if [[ "$DISABLE_AUTO_TITLE" != "true" ]]; then
+ case $TERM in
+ xterm* | rxvt* | urxvt*)
+ precmd() {
+ print -Pn "\e]0;%n@%m: %~\a"
+ }
+ preexec() {
+ #print -Pn "\e]0;$1\a"
+ print -Pn "\e]0;%n@%m: %~ $1\a"
+ }
+ ;;
+ screen*)
+ precmd() {
+ print -nR $'\033k'"zsh"$'\033'\\\
+
+ print -nR $'\033]0;'"zsh"$'\a'
+ }
+ preexec() {
+ print -nR $'\033k'"$1"$'\033'\\\
+
+ print -nR $'\033]0;'"$1"$'\a'
+ }
+ ;;
+ esac
+fi
View
@@ -93,6 +93,9 @@ export RAILS_ENV="development"
export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
+# disable auto-titles to stop zsh from messing up tmux's titles
+export DISABLE_AUTO_TITLE="true"
+
if [[ -f ${HOME}/.zshrc.local ]]; then
source "${HOME}/.zshrc.local"
fi

0 comments on commit 656f050

Please sign in to comment.