diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2017-02-01 01:57:59 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2017-02-01 01:57:59 +0300 |
commit | 052eba9c74b2153dbd70eb4ba829f258a596baf2 (patch) | |
tree | 481a27b0a8b8bc2f53dc68acfee7a98dea86cdd6 | |
parent | 6927b0ca94157e2fb9dcd3b12766b4e913d0e44e (diff) |
Rename `dir_permissions` segment to `dir_writable`
Additionally:
- Add changelog entry
- Add documentation
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index defc1dd0..5db1f6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ Added an option to configure the path separator. If you want something else than an ordinary slash, you could set `POWERLEVEL9K_DIR_PATH_SEPARATOR` to whatever you want. +### New segment 'dir_writable' added + +This segment displays a lock icon if your user has no write permissions in the current folder. + ### New segment 'disk_usage' added This segment will show the usage level of your current partition. @@ -89,6 +89,7 @@ The segments that are currently available are: * [`battery`](#battery) - Current battery status. * [`context`](#context) - Your username and host. * [`dir`](#dir) - Your current working directory. +* `dir_writable` - Displays a lock icon, if you do not have write permissions on the current folder. * [`disk_usage`](#disk_usage) - Disk usage of your current partition. * `history` - The command number for the current line. * [`ip`](#ip) - Shows the current IP address. diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 620a5f7d..b89f390c 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1114,8 +1114,8 @@ prompt_swift_version() { "$1_prompt_segment" "$0" "$2" "magenta" "white" "${swift_version}" 'SWIFT_ICON' } -# dir_permision: Display information about the user's permission to write in the current directory -prompt_dir_permission() { +# dir_writable: Display information about the user's permission to write in the current directory +prompt_dir_writable() { if [[ ! -w "$PWD" ]]; then "$1_prompt_segment" "$0_FORBIDDEN" "$2" "red" "226" "" 'LOCK_ICON' fi |