aboutsummaryrefslogtreecommitdiff
path: root/config/p10k-rainbow.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-05-02 14:36:40 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-05-02 14:36:40 +0300
commit459af1f2382ff53214bf9e4fc598b4e36fb8f8df (patch)
treec07e500a02b2e70806f8bc7739a2fd39295e9953 /config/p10k-rainbow.zsh
parentf14ffcff2c959841cc361cdb671099e011cae058 (diff)
allow dir styling based on the pair: $PWD and whether it's writable
fixes #678
Diffstat (limited to 'config/p10k-rainbow.zsh')
-rw-r--r--config/p10k-rainbow.zsh65
1 files changed, 38 insertions, 27 deletions
diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh
index 3e2783ce..2162e2ca 100644
--- a/config/p10k-rainbow.zsh
+++ b/config/p10k-rainbow.zsh
@@ -268,52 +268,63 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
- # Enable special styling for non-writable directories.
- typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=true
- # Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE
- # above must be set to true for this parameter to have effect.
- # typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
+ # POWERLEVEL9K_DIR_CLASSES below.
+ typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
- # Custom prefix.
- # typeset -g POWERLEVEL9K_DIR_PREFIX='in '
+ # The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is
+ # set to v2.
+ # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
- # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories.
- # It must be an array with 3 * N elements. Each triplet consists of:
+ # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
+ # directories. It must be an array with 3 * N elements. Each triplet consists of:
#
- # 1. A pattern against which the current directory is matched. Matching is done with
+ # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
# extended_glob option enabled.
# 2. Directory class for the purpose of styling.
- # 3. Icon.
- #
- # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there
- # are no matches, the directory will have no icon.
+ # 3. An empty string.
#
- # Example:
+ # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
#
- # typeset -g POWERLEVEL9K_DIR_CLASSES=(
- # '~/work(|/*)' WORK '(╯°□°)╯︵ ┻━┻'
- # '~(|/*)' HOME '⌂'
- # '*' DEFAULT '')
- #
- # With these settings, the current directory in the prompt may look like this:
+ # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v2 and the current directory is not writable,
+ # its class gets suffix _NOT_WRITABLE.
#
- # (╯°□°)╯︵ ┻━┻ ~/work/projects/important/urgent
+ # For example, given these settings:
#
- # Or like this:
+ # typeset -g POWERLEVEL9K_DIR_CLASSES=(
+ # '~/work(|/*)' WORK ''
+ # '~(|/*)' HOME ''
+ # '*' DEFAULT '')
#
- # ⌂ ~/best/powerlevel10k
+ # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class
+ # WORK or WORK_NOT_WRITABLE.
#
- # You can also set different colors for directories of different classes. Remember to override
- # FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish
- # to have its own color.
+ # Simply assigning classes to directories don't have any visible effects. It merely gives you an
+ # option to define custom colors and icons for different directory classes.
#
+ # # Styling for WORK.
+ # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
# typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4
# typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254
# typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250
# typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255
#
+ # # Styling for WORK_NOT_WRITABLE.
+ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
+ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4
+ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254
+ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250
+ # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255
+ #
+ # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
+ # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
+ # back to POWERLEVEL9K_DIR_FOREGROUND.
+ #
# typeset -g POWERLEVEL9K_DIR_CLASSES=()
+ # Custom prefix.
+ # typeset -g POWERLEVEL9K_DIR_PREFIX='in '
+
#####################################[ vcs: git status ]######################################
# Version control system colors.
# typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2