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.
This commit is contained in:
parent
5794c3aeac
commit
452ef223ce
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user