mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-23 15:41:57 +00:00
add cog symbol to dir segment if folder is /etc*
This commit is contained in:
parent
7234d52ebd
commit
557f5993ea
2 changed files with 9 additions and 1 deletions
|
@ -71,6 +71,7 @@ case $POWERLEVEL9K_MODE in
|
||||||
HOME_SUB_ICON $'\uE18D' #
|
HOME_SUB_ICON $'\uE18D' #
|
||||||
FOLDER_ICON $'\uE818' #
|
FOLDER_ICON $'\uE818' #
|
||||||
NETWORK_ICON $'\uE1AD' #
|
NETWORK_ICON $'\uE1AD' #
|
||||||
|
ETC_ICON $'\uE818' #
|
||||||
LOAD_ICON $'\uE190 ' #
|
LOAD_ICON $'\uE190 ' #
|
||||||
SWAP_ICON $'\uE87D' #
|
SWAP_ICON $'\uE87D' #
|
||||||
RAM_ICON $'\uE1E2 ' #
|
RAM_ICON $'\uE1E2 ' #
|
||||||
|
@ -167,6 +168,7 @@ case $POWERLEVEL9K_MODE in
|
||||||
HOME_ICON $'\uF015' #
|
HOME_ICON $'\uF015' #
|
||||||
HOME_SUB_ICON $'\uF07C' #
|
HOME_SUB_ICON $'\uF07C' #
|
||||||
FOLDER_ICON $'\uF115' #
|
FOLDER_ICON $'\uF115' #
|
||||||
|
ETC_ICON $'\uF013' #
|
||||||
NETWORK_ICON $'\uF09E' #
|
NETWORK_ICON $'\uF09E' #
|
||||||
LOAD_ICON $'\uF080 ' #
|
LOAD_ICON $'\uF080 ' #
|
||||||
SWAP_ICON $'\uF0E4' #
|
SWAP_ICON $'\uF0E4' #
|
||||||
|
@ -266,6 +268,7 @@ case $POWERLEVEL9K_MODE in
|
||||||
HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME #
|
HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME #
|
||||||
HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN #
|
HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN #
|
||||||
FOLDER_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_O #
|
FOLDER_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_O #
|
||||||
|
ETC_ICON $'\uF013' #
|
||||||
NETWORK_ICON '\u'$CODEPOINT_OF_AWESOME_RSS #
|
NETWORK_ICON '\u'$CODEPOINT_OF_AWESOME_RSS #
|
||||||
LOAD_ICON '\u'$CODEPOINT_OF_AWESOME_BAR_CHART' ' #
|
LOAD_ICON '\u'$CODEPOINT_OF_AWESOME_BAR_CHART' ' #
|
||||||
SWAP_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD #
|
SWAP_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD #
|
||||||
|
@ -359,6 +362,7 @@ case $POWERLEVEL9K_MODE in
|
||||||
HOME_ICON $'\uF015' #
|
HOME_ICON $'\uF015' #
|
||||||
HOME_SUB_ICON $'\uF07C' #
|
HOME_SUB_ICON $'\uF07C' #
|
||||||
FOLDER_ICON $'\uF115' #
|
FOLDER_ICON $'\uF115' #
|
||||||
|
ETC_ICON $'\uF013' #
|
||||||
NETWORK_ICON $'\uF1EB' #
|
NETWORK_ICON $'\uF1EB' #
|
||||||
LOAD_ICON $'\uF080 ' #
|
LOAD_ICON $'\uF080 ' #
|
||||||
SWAP_ICON $'\uF464' #
|
SWAP_ICON $'\uF464' #
|
||||||
|
@ -452,6 +456,7 @@ case $POWERLEVEL9K_MODE in
|
||||||
HOME_ICON ''
|
HOME_ICON ''
|
||||||
HOME_SUB_ICON ''
|
HOME_SUB_ICON ''
|
||||||
FOLDER_ICON ''
|
FOLDER_ICON ''
|
||||||
|
ETC_ICON $'\uF013' #
|
||||||
NETWORK_ICON 'IP'
|
NETWORK_ICON 'IP'
|
||||||
LOAD_ICON 'L'
|
LOAD_ICON 'L'
|
||||||
SWAP_ICON 'SWP'
|
SWAP_ICON 'SWP'
|
||||||
|
|
|
@ -909,10 +909,13 @@ prompt_dir() {
|
||||||
"HOME" "HOME_ICON"
|
"HOME" "HOME_ICON"
|
||||||
"HOME_SUBFOLDER" "HOME_SUB_ICON"
|
"HOME_SUBFOLDER" "HOME_SUB_ICON"
|
||||||
"NOT_WRITABLE" "LOCK_ICON"
|
"NOT_WRITABLE" "LOCK_ICON"
|
||||||
|
"ETC" "ETC_ICON"
|
||||||
)
|
)
|
||||||
local state_path="$(print -P '%~')"
|
local state_path="$(print -P '%~')"
|
||||||
local current_state="DEFAULT"
|
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"
|
current_state="NOT_WRITABLE"
|
||||||
elif [[ $state_path == '~' ]]; then
|
elif [[ $state_path == '~' ]]; then
|
||||||
current_state="HOME"
|
current_state="HOME"
|
||||||
|
|
Loading…
Reference in a new issue