From 732358e77a4f671dda2a481d292f027f9c2794a2 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 16 Feb 2014 23:49:09 +0900 Subject: [PATCH] setup color for my new machine --- setup.sh | 2 +- shrc | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index 33e49d0..bc3f596 100755 --- a/setup.sh +++ b/setup.sh @@ -167,7 +167,7 @@ setup_tmux(){ tmux_bg_color=yellow tmux_fg_color=black ;; - darwin-mba.local) + arch-mba) tmux_bg_color=cyan tmux_fg_color=black ;; diff --git a/shrc b/shrc index 2d658af..bf989a3 100755 --- a/shrc +++ b/shrc @@ -1188,7 +1188,7 @@ then arch-aspireone) __my_c4="$__color_yellow" ;; - darwin-mba.local) + arch-mba) __my_c4="$__color_light_cyan" ;; newkiwi) @@ -1241,6 +1241,9 @@ else # PS1="$(printf $(whoami)@$(hostname)$ )" fi +################################### +# set header and titles + __my_set_header_line(){ # save current position printf "\033[s" @@ -1277,14 +1280,14 @@ __my_set_title(){ if test -n "$TMUX" then + # running tmux locally __terminal_title="\$(basename \${PWD})" +elif test -n "$SSH_CONNECTION" && expr "$TERM" : '^screen' >/dev/null +then + # ssh connect from tmux terminal + __terminal_title="`whoami`@`hostname`:\$(basename \${PWD})" else - if test -n "$SSH_CONNECTION" && expr "$TERM" : '^screen' >/dev/null - then - __terminal_title="`whoami`@`hostname`:\$(basename \${PWD})" - else - __terminal_title="`whoami`@`hostname`:\${PWD}" - fi + __terminal_title="`whoami`@`hostname`:\${PWD}" fi if $inzsh