diff options
author | Hugues Hiegel <hugues.hiegel@anevia.com> | 2015-03-26 11:24:01 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@anevia.com> | 2015-03-26 11:24:01 +0100 |
commit | 3fb92fb9b55b3f1c1372b539f898ad7cf2bf7907 (patch) | |
tree | af98f0e43973da1d51a2e6132d9f22ae794bb6a3 /01_Internal.zsh | |
parent | 0e8ceb4536664f28076dc0e1fc7e865dc44cdc7b (diff) |
[tmux][screen] termcaps, titles, prompt colors..
Diffstat (limited to '01_Internal.zsh')
-rw-r--r-- | 01_Internal.zsh | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh index eafc0a4..844823c 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -57,22 +57,24 @@ __term_title() screen*) local _sep="" [ $# -gt 0 ] && _sep=$1 && shift # gets and discards the separator, if any. - #if [ ! -z "$TMUX" ] - #then - # Tmux - #print -Pn "\e]0;%n@%m (%l) %~${_sep:+$_sep #[fg=yellow,bold]}$@\a" # Sets term title - print -Pn "\e]0;#[fg=red]%n#[fg=default,bold]@#[fg=red]%m#[default] (#[fg=cyan]%l#[fg=default]) #[fg=red]%~${_sep:+#[default,fg=default]$_sep #[fg=yellow,bold]}$(echo $@|sed 's/%/%%/g')\a" - #else - # Classic screen - # hardstatus - #print -Pn "\e]2;{+b W}SCREEN #n {-b W}| {R}?u(u) ?{W}{r}%n@%m{W} ({c}%l{W}) {R}%~{W}${_sep:+$_sep \{+b Y\}}$@{-b W}\a" # Sets hardstatus line (term title) - # print -Pn "\e]2;{R}?u(u) ?{W}{r}%n{R}@{r}%m{-b W} ({+b c}%l{-b W}) {R}%~{W}${_sep:+$_sep \{+b Y\}}$@{-b W}\a" # Sets hardstatus line (term title) - # caption - # print -Pn "\ek" - # [ "$SUDO_USER" != "" ] && print -Pn "($USER) " - # print -Pn "${@:-%~}" - # print -Pn "\e\\" - #fi + # Tmux + #print -Pn "\e]0;%n@%m (%l) %~${_sep:+$_sep #[fg=yellow,bold]}$@\a" # Sets term title + case $(_process_tree) in + *":: tmux ::"*) + print -Pn "\e]0;#[fg=red]%n#[fg=default,bold]@#[fg=red]%m#[default] (#[fg=cyan]%l#[fg=default]) #[fg=red]%~${_sep:+#[default,fg=default]$_sep #[fg=yellow,bold]}$(echo $@|sed 's/%/%%/g')\a" + ;; + *":: SCREEN ::"*) + # Classic screen + # hardstatus + #print -Pn "\e]2;{+b W}SCREEN #n {-b W}| {R}?u(u) ?{W}{r}%n@%m{W} ({c}%l{W}) {R}%~{W}${_sep:+$_sep \{+b Y\}}$@{-b W}\a" # Sets hardstatus line (term title) + #print -Pn "\e]2;{R}?u(u) ?{W}{r}%n{R}@{r}%m{-b W} ({+b c}%l{-b W}) {R}%~{W}${_sep:+$_sep \{+b Y\}}$@{-b W}\a" # Sets hardstatus line (term title) + # caption + #print -Pn "\ek" + #[ "$SUDO_USER" != "" ] && print -Pn "($USER) " + #print -Pn "${@:-%~}" + #print -Pn "\e\\" + ;; + esac ;; *) ;; |