You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
This can be easily done if you just add dir states and separate conditions. For instance, here I've added a "DROPBOX""state that uses "DROPBOX_ICON" for paths that contain '~/dropbox'*, almost exactly the same as the current/etc conditions.
# save state of path for highlighting and bold options
local path_opt=$current_path
typeset -AH dir_states
dir_states=(
"DEFAULT" "FOLDER_ICON"
"HOME" "HOME_ICON"
"HOME_SUBFOLDER" "HOME_SUB_ICON"
"NOT_WRITABLE" "LOCK_ICON"
"ETC" "ETC_ICON"
"DROPBOX" "DROPBOX_ICON"
)
local state_path="$(print -P '%~')"
local current_state="DEFAULT"
if [[ $state_path == '/etc'* ]]; then
current_state='ETC'
elif [[ "${POWERLEVEL9K_DIR_SHOW_WRITABLE}" == true && ! -w "$PWD" ]]; then
current_state="NOT_WRITABLE"
elif [[ $state_path == '~/dropbox'* ]]; then
current_state="DROPBOX"
elif [[ $state_path == '~' ]]; then
current_state="HOME"
elif [[ $state_path == '~'* ]]; then
current_state="HOME_SUBFOLDER"
fi
My question is; how could we do this within .zshrc instead of modifying powerline9k.zsh-theme?
I've seen other users utilize the custom_user prompt status in .zshrc to easily add icons and the like, but to my knowledge there is not a custom_dir status to do the same thing, and even so would it allow conditional formatting to icons?
The text was updated successfully, but these errors were encountered:
First I just want to say that I am brand new to git and contributing to open source projects. This might be a simple issue.
I want to modify the
prompt_dir()
function inpowerklevel9k.zsh-theme
to include more conditions to replace the icon depending of thestate_path
.This issue is related to #606.
This can be easily done if you just add dir states and separate conditions. For instance, here I've added a
"DROPBOX"
"state that uses"DROPBOX_ICON"
for paths that contain'~/dropbox'*
, almost exactly the same as the current/etc
conditions.My question is; how could we do this within
.zshrc
instead of modifyingpowerline9k.zsh-theme
?I've seen other users utilize the
custom_user
prompt status in.zshrc
to easily add icons and the like, but to my knowledge there is not acustom_dir
status to do the same thing, and even so would it allow conditional formatting to icons?The text was updated successfully, but these errors were encountered: