Created
May 4, 2017 02:41
-
-
Save alesandar/0540e337532745d224ee90c24f8e7a08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set tmux pane and tab title | |
function tmux_title_precmd() { | |
print -Pn "\e]2;zsh\a" | |
print -Pn "\e]1;zsh\a" | |
} | |
function tmux_title_preexec() { | |
print -Pn "\e]2;$(echo "$1" | cut -d" " -f1)\a" | |
print -Pn "\e]1;$1\a" | |
# print -Pn "\e]2;$2:q\a" | |
} | |
if [[ "$TERM" == (screen*|tmux*) ]]; then | |
add-zsh-hook -Uz precmd tmux_title_precmd | |
add-zsh-hook -Uz preexec tmux_title_preexec | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment