mirror of
https://codeberg.org/frosty/iceline.git
synced 2024-09-19 11:36:39 -04:00
first draft ssh area
This commit is contained in:
parent
78c71e052c
commit
4202ddd068
|
@ -23,6 +23,8 @@ PROMPT_COL_SUCCESS='\[\e[1;32m\]'
|
||||||
PROMPT_COL_FAILURE='\[\e[1;31m\]'
|
PROMPT_COL_FAILURE='\[\e[1;31m\]'
|
||||||
# Line color
|
# Line color
|
||||||
PROMPT_COL_LINE='\[\e[0;37m\]'
|
PROMPT_COL_LINE='\[\e[0;37m\]'
|
||||||
|
# SSH notice color
|
||||||
|
PROMPT_COL_SSH='\[\e[1;32m\]'
|
||||||
# Time format
|
# Time format
|
||||||
PROMPT_TIME_FORMAT='%H:%M:%S'
|
PROMPT_TIME_FORMAT='%H:%M:%S'
|
||||||
# Prompt character
|
# Prompt character
|
||||||
|
@ -77,7 +79,7 @@ _prompt_command() {
|
||||||
# Top part of line
|
# Top part of line
|
||||||
[ "$PROMPT_ENABLE_LINE" -eq 1 ] && PS1+="${PROMPT_COL_LINE}┌ "
|
[ "$PROMPT_ENABLE_LINE" -eq 1 ] && PS1+="${PROMPT_COL_LINE}┌ "
|
||||||
|
|
||||||
# Date (HH:MM:SS)
|
# Date
|
||||||
PS1+="${PROMPT_COL_TIME}\D{${PROMPT_TIME_FORMAT}} "
|
PS1+="${PROMPT_COL_TIME}\D{${PROMPT_TIME_FORMAT}} "
|
||||||
|
|
||||||
# user@host OR root
|
# user@host OR root
|
||||||
|
@ -101,6 +103,9 @@ _prompt_command() {
|
||||||
# Bottom part of line
|
# Bottom part of line
|
||||||
[ "$PROMPT_ENABLE_LINE" -eq 1 ] && PS1+="${PROMPT_COL_LINE}└ "
|
[ "$PROMPT_ENABLE_LINE" -eq 1 ] && PS1+="${PROMPT_COL_LINE}└ "
|
||||||
|
|
||||||
|
# SSH information (if applicable)
|
||||||
|
[ -n "$SSH_CLIENT" ] && PS1+="${PROMPT_COL_SSH}SSH "
|
||||||
|
|
||||||
# Prompt character
|
# Prompt character
|
||||||
PS1+="${prompt_color}${PROMPT_CHARACTER} "
|
PS1+="${prompt_color}${PROMPT_CHARACTER} "
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue