From 452ef223cea64ab8be27b7a273bd18dd4f4bcb36 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 25 Sep 2012 21:09:51 +0200 Subject: [PATCH] Better default host colorscheme Add two color for the X11 support, green (support) and yellow (no support, not set in red, because it is not a critical warning). The bold cyan of the hostname was to close to the green of the colon and the @, change it to blue. --- README.md | 3 ++- liquid.theme | 5 +++-- liquidprompt | 9 +++++---- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 063ffc1..9418705 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,8 @@ Set to a null string "" if you do not want color. * `LP_COLOR_HOST` local host * `LP_COLOR_SSH` connected via SSH * `LP_COLOR_TELNET` connected via telnet - * `LP_COLOR_X11` connected with X11 support + * `LP_COLOR_X11_ON` connected with X11 support + * `LP_COLOR_X11_OFF` connected without X11 support * Separation mark (aka permiison in the working dir) * `LP_COLOR_WRITE` have write permission * `LP_COLOR_NOWRITE` do not have write permission diff --git a/liquid.theme b/liquid.theme index b434241..a2dd601 100644 --- a/liquid.theme +++ b/liquid.theme @@ -63,9 +63,10 @@ LP_COLOR_USER_ROOT="$BOLD_YELLOW" # root # Hostname LP_COLOR_HOST="" # local host -LP_COLOR_SSH="$BOLD_CYAN" # connected via SSH +LP_COLOR_SSH="$BLUE" # connected via SSH LP_COLOR_TELNET="$WARN_RED" # connected via telnet -LP_COLOR_X11="$BLUE" # connected with X11 support +LP_COLOR_X11_ON="$GREEN" # connected with X11 support +LP_COLOR_X11_OFF="$YELLOW" # connected without X11 support # Separation mark (aka permiison in the working dir) LP_COLOR_WRITE="$GREEN" # have write permission diff --git a/liquidprompt b/liquidprompt index 96b13a2..14632d5 100755 --- a/liquidprompt +++ b/liquidprompt @@ -223,9 +223,10 @@ _lp_source_config() LP_COLOR_USER_ALT=${LP_COLOR_USER_ALT:-$BOLD} LP_COLOR_USER_ROOT=${_ROOT:-$BOLD_YELLOW} LP_COLOR_HOST=${LP_COLOR_HOST:-""} - LP_COLOR_SSH=${LP_COLOR_SSH:-$BOLD_CYAN} + LP_COLOR_SSH=${LP_COLOR_SSH:-$BLUE} LP_COLOR_TELNET=${LP_COLOR_TELNET:-$WARN_RED} - LP_COLOR_X11=${LP_COLOR_X11:-$BLUE} + LP_COLOR_X11_ON=${LP_COLOR_X11:-$GREEN} + LP_COLOR_X11_OFF=${LP_COLOR_X11:-$YELLOW} LP_COLOR_WRITE=${LP_COLOR_WRITE:-$GREEN} LP_COLOR_NOWRITE=${LP_COLOR_NOWRITE:-$RED} LP_COLOR_UP=${LP_COLOR_UP:-$GREEN} @@ -341,9 +342,9 @@ fi # If we are connected with a X11 support if [[ -n "$DISPLAY" ]] ; then - LP_HOST="${LP_COLOR_X11}${LP_HOST}@${NO_COL}" + LP_HOST="${LP_COLOR_X11_ON}${LP_HOST}@${NO_COL}" else - LP_HOST="${LP_HOST}@" + LP_HOST="${LP_COLOR_X11_OFF}${LP_HOST}@${NO_COL}" fi case "$(_lp_connection)" in