mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Merge remote-tracking branch 'sambadevi/feature/etc-option-in-dir-segment' into staging_065
This commit is contained in:
commit
47e2aed4b2
2 changed files with 9 additions and 1 deletions
|
@ -71,6 +71,7 @@ case $POWERLEVEL9K_MODE in
|
|||
HOME_SUB_ICON $'\uE18D' #
|
||||
FOLDER_ICON $'\uE818' #
|
||||
NETWORK_ICON $'\uE1AD' #
|
||||
ETC_ICON $'\uE818' #
|
||||
LOAD_ICON $'\uE190 ' #
|
||||
SWAP_ICON $'\uE87D' #
|
||||
RAM_ICON $'\uE1E2 ' #
|
||||
|
@ -168,6 +169,7 @@ case $POWERLEVEL9K_MODE in
|
|||
HOME_ICON $'\uF015' #
|
||||
HOME_SUB_ICON $'\uF07C' #
|
||||
FOLDER_ICON $'\uF115' #
|
||||
ETC_ICON $'\uF013' #
|
||||
NETWORK_ICON $'\uF09E' #
|
||||
LOAD_ICON $'\uF080 ' #
|
||||
SWAP_ICON $'\uF0E4' #
|
||||
|
@ -268,6 +270,7 @@ case $POWERLEVEL9K_MODE in
|
|||
HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME #
|
||||
HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN #
|
||||
FOLDER_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_O #
|
||||
ETC_ICON $'\uF013' #
|
||||
NETWORK_ICON '\u'$CODEPOINT_OF_AWESOME_RSS #
|
||||
LOAD_ICON '\u'$CODEPOINT_OF_AWESOME_BAR_CHART' ' #
|
||||
SWAP_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD #
|
||||
|
@ -362,6 +365,7 @@ case $POWERLEVEL9K_MODE in
|
|||
HOME_ICON $'\uF015' #
|
||||
HOME_SUB_ICON $'\uF07C' #
|
||||
FOLDER_ICON $'\uF115' #
|
||||
ETC_ICON $'\uF013' #
|
||||
NETWORK_ICON $'\uF1EB' #
|
||||
LOAD_ICON $'\uF080 ' #
|
||||
SWAP_ICON $'\uF464' #
|
||||
|
@ -456,6 +460,7 @@ case $POWERLEVEL9K_MODE in
|
|||
HOME_ICON ''
|
||||
HOME_SUB_ICON ''
|
||||
FOLDER_ICON ''
|
||||
ETC_ICON $'\uF013' #
|
||||
NETWORK_ICON 'IP'
|
||||
LOAD_ICON 'L'
|
||||
SWAP_ICON 'SWP'
|
||||
|
|
|
@ -915,10 +915,13 @@ prompt_dir() {
|
|||
"HOME" "HOME_ICON"
|
||||
"HOME_SUBFOLDER" "HOME_SUB_ICON"
|
||||
"NOT_WRITABLE" "LOCK_ICON"
|
||||
"ETC" "ETC_ICON"
|
||||
)
|
||||
local state_path="$(print -P '%~')"
|
||||
local current_state="DEFAULT"
|
||||
if [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
|
||||
if [[ $state_path == '/etc'* ]]; then
|
||||
current_state='ETC'
|
||||
elif [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
|
||||
current_state="NOT_WRITABLE"
|
||||
elif [[ $state_path == '~' ]]; then
|
||||
current_state="HOME"
|
||||
|
|
Loading…
Reference in a new issue