Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better auto-renamed for tmux

  • Loading branch information...
commit 656f050ba06c493a079633aa48754cf630571ce6 1 parent cca9f37
@morhekil authored
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
1  tmux.conf
@@ -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
48 zsh/includes/S60_prompt
@@ -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
3  zsh/zshrc
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.