mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
add new icons and add remote_sudo
This commit is contained in:
parent
3893785873
commit
7fff5bd7a6
2 changed files with 14 additions and 6 deletions
|
@ -27,6 +27,7 @@ case $POWERLEVEL9K_MODE in
|
|||
RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' #
|
||||
CARRIAGE_RETURN_ICON $'\u21B5' # ↵
|
||||
ROOT_ICON $'\uE801' #
|
||||
SUDO_ICON $'\uF09C' #
|
||||
RUBY_ICON $'\uE847 ' #
|
||||
AWS_ICON $'\uE895' #
|
||||
AWS_EB_ICON $'\U1F331 ' # 🌱
|
||||
|
@ -105,6 +106,7 @@ case $POWERLEVEL9K_MODE in
|
|||
RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' #
|
||||
CARRIAGE_RETURN_ICON $'\u21B5' # ↵
|
||||
ROOT_ICON $'\uF201' #
|
||||
SUDO_ICON $'\uF09C' #
|
||||
RUBY_ICON $'\uF219 ' #
|
||||
AWS_ICON $'\uF270' #
|
||||
AWS_EB_ICON $'\U1F331 ' # 🌱
|
||||
|
@ -188,6 +190,7 @@ case $POWERLEVEL9K_MODE in
|
|||
RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' #
|
||||
CARRIAGE_RETURN_ICON $'\u21B5' # ↵
|
||||
ROOT_ICON '\u'$CODEPOINT_OF_OCTICONS_ZAP #
|
||||
SUDO_ICON '\u'$CODEPOINT_OF_AWESOME_UNLOCK #
|
||||
RUBY_ICON '\u'$CODEPOINT_OF_OCTICONS_RUBY' ' #
|
||||
AWS_ICON '\u'$CODEPOINT_OF_AWESOME_SERVER #
|
||||
AWS_EB_ICON $'\U1F331 ' # 🌱
|
||||
|
@ -258,7 +261,7 @@ case $POWERLEVEL9K_MODE in
|
|||
RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' #
|
||||
CARRIAGE_RETURN_ICON $'\u21B5' # ↵
|
||||
ROOT_ICON $'\uE614 ' #
|
||||
SUDO_ICON $'\uE0A2' #
|
||||
SUDO_ICON $'\uF09C' #
|
||||
RUBY_ICON $'\uF219 ' #
|
||||
AWS_ICON $'\uF270' #
|
||||
AWS_EB_ICON $'\UF1BD ' #
|
||||
|
|
|
@ -593,6 +593,7 @@ prompt_context() {
|
|||
"SUDO" "yellow"
|
||||
"DEFAULT" "yellow"
|
||||
"REMOTE" "yellow"
|
||||
"REMOTE_SUDO" "yellow"
|
||||
)
|
||||
|
||||
local content=""
|
||||
|
@ -608,7 +609,11 @@ prompt_context() {
|
|||
if [[ $(print -P "%#") == '#' ]]; then
|
||||
current_state="ROOT"
|
||||
elif [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
|
||||
if sudo -n true 2>/dev/null; then
|
||||
current_state="REMOTE_SUDO"
|
||||
else
|
||||
current_state="REMOTE"
|
||||
fi
|
||||
elif sudo -n true 2>/dev/null; then
|
||||
current_state="SUDO"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue