Browse Source

change darwin color

pull/1/head
10sr 12 years ago
parent
commit
ab1722b413
2 changed files with 13 additions and 3 deletions
  1. +12
    -2
      bashrc
  2. +1
    -1
      tmux.conf.pl

+ 12
- 2
bashrc View File

@@ -685,16 +685,19 @@ ip-address(){
test -n "$ip" && printf $1 $ip test -n "$ip" && printf $1 $ip
} }



__my_ps1_script(){ __my_ps1_script(){
local last=$? local last=$?
test -n "$SCRIPT" && echo "${__my_c5}SCR${__my_cdef} " test -n "$SCRIPT" && echo "${__my_c5}SCR${__my_cdef} "
return $last return $last
} }

__my_ps1_scale(){ __my_ps1_scale(){
local last=$? local last=$?
printf "${LINES}x${COLUMNS}" printf "${LINES}x${COLUMNS}"
return $last return $last
} }

__my_ps1_tmux(){ __my_ps1_tmux(){
local last=$? local last=$?
null type tmux || return $last null type tmux || return $last
@@ -702,11 +705,13 @@ __my_ps1_tmux(){
test -n "$TMUX" && echo "[TMUX:$tmuxc]" test -n "$TMUX" && echo "[TMUX:$tmuxc]"
return $last return $last
} }

__my_ps1_moc(){ __my_ps1_moc(){
local last=$? local last=$?
__my_moc_state "[MOC:%s]" __my_moc_state "[MOC:%s]"
return $last return $last
} }

for f in /usr/share/git/git-prompt.sh \ for f in /usr/share/git/git-prompt.sh \
/opt/local/share/doc/git-core/contrib/completion/git-prompt.sh /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh
do do
@@ -721,11 +726,13 @@ __my_ps1_git(){
__git_ps1 "[GIT:$(__try_exec git config --get user.name):%s]" __git_ps1 "[GIT:$(__try_exec git config --get user.name):%s]"
return $last return $last
} }

__my_ps1_ipaddr(){ __my_ps1_ipaddr(){
local last=$? local last=$?
! iswindows && ip-address [Addr:%s] ! iswindows && ip-address [Addr:%s]
return $last return $last
} }

__my_ps1_bttry(){ __my_ps1_bttry(){
local last=$? local last=$?
local bst="${TMP}/batterystatus" local bst="${TMP}/batterystatus"
@@ -738,19 +745,22 @@ __my_ps1_bttry(){
fi fi
return $last return $last
} }

__my_ps1_dirs(){ __my_ps1_dirs(){
dirs | wc -l dirs | wc -l
} }

__my_ps1_jobs(){ __my_ps1_jobs(){
jobs | wc -l jobs | wc -l
} }

if test "$TERM" != dumb if test "$TERM" != dumb
then then
__my_c1="\[\e[1;31m\]" # color for PWD
__my_c1="\[\e[0;33m\]" # color for PWD
__my_c2="\[\e[0;36m\]" # color for user __my_c2="\[\e[0;36m\]" # color for user
__my_c3="\[\e[1;30m\]" # color for OLDPWD __my_c3="\[\e[1;30m\]" # color for OLDPWD
if test "`hostname`" = arch-aspireone; then __my_c4="\[\e[1;34m\]" if test "`hostname`" = arch-aspireone; then __my_c4="\[\e[1;34m\]"
elif test "`hostname`" = darwin-mba.local; then __my_c4="\[\e[1;33m\]"
elif test "`hostname`" = darwin-mba.local; then __my_c4="\[\e[1;31m\]"
elif test "`hostname`" = newkiwi; then __my_c4="\[\e[1;35m\]" elif test "`hostname`" = newkiwi; then __my_c4="\[\e[1;35m\]"
else __my_c4="\[\e[1;32m\]" # color for :: else __my_c4="\[\e[1;32m\]" # color for ::
fi fi


+ 1
- 1
tmux.conf.pl View File

@@ -9,7 +9,7 @@ my @tmux_setw_command = ("setw", "-g");


my %color_prefs = ( my %color_prefs = (
"arch-aspireone" => "blue,white", "arch-aspireone" => "blue,white",
"darwin-mba.local" => "yellow,black",
"darwin-mba.local" => "red,white",
"newkiwi" => "magenta,white" "newkiwi" => "magenta,white"
); );
my $color_def = "green,white"; my $color_def = "green,white";


Loading…
Cancel
Save