fix(mark): add a sudo mark
- Do not rely only on color, for some people may be colorblind. Adds an additional character, which can be set to '' for users not wanting it. - Use a more centered square for the prompt mark.
This commit is contained in:
parent
fa47cd5309
commit
be28a24b20
6 changed files with 13 additions and 3 deletions
|
|
@ -326,11 +326,16 @@ The marker used to indicate that there is some change in the VCS state
|
|||
The marker used to indicate that there is a VCS involved in the current directory.
|
||||
|
||||
|
||||
**DOTMATRIX_MARK** *string = "■"*
|
||||
**DOTMATRIX_MARK** *string = "⯀"*
|
||||
|
||||
The actual prompt marker, right where the user type text.
|
||||
|
||||
|
||||
**DOTMATRIX_MARK_SUDO** *string = "⋮"*
|
||||
|
||||
An additional character displayed before the last prompt mark
|
||||
when the user has sudo rights.
|
||||
|
||||
**DOTMATRIX_ENABLE_GRADIENT_LINE** *boolean = 0*
|
||||
|
||||
If set to 0 (the default), will draw the line of the middle section
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ _lp_dotmatrix_theme_activate() {
|
|||
DOTMATRIX_HOST_LOCAL=${DOTMATRIX_HOST_LOCAL:-"⌂"}
|
||||
DOTMATRIX_USER_LOCAL=${DOTMATRIX_USER_LOCAL:-"♟"}
|
||||
DOTMATRIX_VCS=${DOTMATRIX_VCS:-"╟┘"}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-"■"}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-"⯀"}
|
||||
DOTMATRIX_MARK_SUDO=${DOTMATRIX_MARK_SUDO:-"⋮"}
|
||||
DOTMATRIX_LINE=${DOTMATRIX_LINE:-"━"}
|
||||
DOTMATRIX_PLUG=${DOTMATRIX_PLUG:-"▛"}
|
||||
DOTMATRIX_SOFT=${DOTMATRIX_SOFT:-"╱"}
|
||||
|
|
@ -630,7 +631,7 @@ _lp_dotmatrix_theme_prompt() {
|
|||
local dcwfg="${DOTMATRIX_COLOR_WARN[_LP_FIRST_INDEX+1]}"
|
||||
[[ -z $dcwfg ]] && dcwfg=-1
|
||||
lp_terminal_format $dcwfg
|
||||
dotmatrix_prompt+="${lp_terminal_format}${DOTMATRIX_MARK}"
|
||||
dotmatrix_prompt+="${lp_terminal_format}${DOTMATRIX_MARK_SUDO}${DOTMATRIX_MARK}"
|
||||
else
|
||||
dotmatrix_prompt+="${mark_color}${DOTMATRIX_MARK}"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ DOTMATRIX_HOST_LOCAL=${DOTMATRIX_HOST_LOCAL:-""}
|
|||
DOTMATRIX_USER_LOCAL=${DOTMATRIX_USER_LOCAL:-""}
|
||||
DOTMATRIX_VCS=${DOTMATRIX_VCS:-""}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-""}
|
||||
DOTMATRIX_MARK_SUDO=${DOTMATRIX_MARK_SUDO:-"⁘"} # ⁘ 🞙
|
||||
DOTMATRIX_LINE=${DOTMATRIX_LINE:-"━"}
|
||||
DOTMATRIX_PLUG=${DOTMATRIX_PLUG:-""}
|
||||
DOTMATRIX_SOFT=${DOTMATRIX_SOFT:-"╱"}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ DOTMATRIX_HOST_LOCAL=${DOTMATRIX_HOST_LOCAL:-""}
|
|||
DOTMATRIX_USER_LOCAL=${DOTMATRIX_USER_LOCAL:-""}
|
||||
DOTMATRIX_VCS=${DOTMATRIX_VCS:-""}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-""}
|
||||
DOTMATRIX_MARK_SUDO=${DOTMATRIX_MARK_SUDO:-"⚬"} # ⁘ ⚬ 🞙
|
||||
DOTMATRIX_LINE=${DOTMATRIX_LINE:-"━"}
|
||||
DOTMATRIX_PLUG=${DOTMATRIX_PLUG:-""}
|
||||
DOTMATRIX_SOFT=${DOTMATRIX_SOFT:-"╱"}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ DOTMATRIX_HOST_LOCAL=${DOTMATRIX_HOST_LOCAL:-""}
|
|||
DOTMATRIX_USER_LOCAL=${DOTMATRIX_USER_LOCAL:-""}
|
||||
DOTMATRIX_VCS=${DOTMATRIX_VCS:-""}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-""}
|
||||
DOTMATRIX_MARK_SUDO=${DOTMATRIX_MARK_SUDO:-"🞙"} # ⁘ ⚬ 🞙
|
||||
DOTMATRIX_LINE=${DOTMATRIX_LINE:-"━"}
|
||||
DOTMATRIX_PLUG=${DOTMATRIX_PLUG:-""}
|
||||
DOTMATRIX_SOFT=${DOTMATRIX_SOFT:-"╱"}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ DOTMATRIX_HOST_LOCAL=${DOTMATRIX_HOST_LOCAL:-"lcl"}
|
|||
DOTMATRIX_USER_LOCAL=${DOTMATRIX_USER_LOCAL:-"me"}
|
||||
DOTMATRIX_VCS=${DOTMATRIX_VCS:-"VCS"}
|
||||
DOTMATRIX_MARK=${DOTMATRIX_MARK:-">"}
|
||||
DOTMATRIX_MARK_SUDO=${DOTMATRIX_MARK_SUDO:-"!"}
|
||||
DOTMATRIX_LINE=${DOTMATRIX_LINE:-"━"}
|
||||
DOTMATRIX_PLUG=${DOTMATRIX_PLUG:-"▌"}
|
||||
DOTMATRIX_SOFT=${DOTMATRIX_SOFT:-"╱"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue