aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--functions/icons.zsh74
-rwxr-xr-xpowerlevel9k.zsh-theme10
3 files changed, 84 insertions, 6 deletions
diff --git a/README.md b/README.md
index 9d0ba2be..4b0c2791 100644
--- a/README.md
+++ b/README.md
@@ -509,7 +509,11 @@ This segment shows the version of Ruby being used when using `rbenv` to change y
It figures out the version being used by taking the output of the `rbenv version-name` command.
* If `rbenv` is not in $PATH, nothing will be shown.
-* If the current Ruby version is the same as the global Ruby version, nothing will be shown.
+* By default, if the current local Ruby version is the same as the global Ruby version, nothing will be shown. See the configuration variable, below, to modify this behavior.
+
+Variable | Default Value | Description |
+|----------|---------------|-------------|
+|`POWERLEVEL9K_RBENV_ALWAYS`|'false'|Always show the `rbenv` segment, even if the local version matches the global.|
##### rspec_stats
diff --git a/functions/icons.zsh b/functions/icons.zsh
index 3a4909f7..a20cef2c 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -160,6 +160,80 @@ case $POWERLEVEL9K_MODE in
KUBERNETES_ICON $'\U2388' # ⎈
)
;;
+ 'awesome-mapped-fontconfig')
+ # mapped fontconfig with awesome-font required! See
+ # https://github.com/gabrielelana/awesome-terminal-fonts
+ # don't forget to source the font maps in your startup script
+ # Set the right locale to protect special characters
+ local LC_ALL="" LC_CTYPE="en_US.UTF-8"
+
+ if [ -z "$AWESOME_GLYPHS_LOADED" ]; then
+ echo "Powerlevel9k warning: Awesome-Font mappings have not been loaded.
+ Source a font mapping in your shell config, per the Awesome-Font docs
+ (https://github.com/gabrielelana/awesome-terminal-fonts),
+ Or use a different Powerlevel9k font configuration.";
+ fi
+
+ icons=(
+ LEFT_SEGMENT_SEPARATOR $'\uE0B0' # 
+ RIGHT_SEGMENT_SEPARATOR $'\uE0B2' # 
+ LEFT_SEGMENT_END_SEPARATOR ' ' # Whitespace
+ LEFT_SUBSEGMENT_SEPARATOR $'\uE0B1' # 
+ RIGHT_SUBSEGMENT_SEPARATOR $'\uE0B3' # 
+ CARRIAGE_RETURN_ICON $'\u21B5' # ↵
+ ROOT_ICON '\u'$CODEPOINT_OF_OCTICONS_ZAP # 
+ RUBY_ICON '\u'$CODEPOINT_OF_OCTICONS_RUBY' ' # 
+ AWS_ICON '\u'$CODEPOINT_OF_AWESOME_SERVER # 
+ AWS_EB_ICON $'\U1F331 ' # 🌱
+ BACKGROUND_JOBS_ICON '\u'$CODEPOINT_OF_AWESOME_COG' ' # 
+ TEST_ICON '\u'$CODEPOINT_OF_AWESOME_BUG # 
+ TODO_ICON '\u'$CODEPOINT_OF_AWESOME_CHECK_SQUARE_O # 
+ BATTERY_ICON '\U'$CODEPOINT_OF_AWESOME_BATTERY_FULL # 
+ DISK_ICON '\u'$CODEPOINT_OF_AWESOME_HDD_O' ' # 
+ OK_ICON '\u'$CODEPOINT_OF_AWESOME_CHECK # 
+ FAIL_ICON '\u'$CODEPOINT_OF_AWESOME_TIMES # 
+ SYMFONY_ICON 'SF'
+ NODE_ICON $'\u2B22' # ⬢
+ MULTILINE_FIRST_PROMPT_PREFIX $'\u256D'$'\U2500' # ╭─
+ MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\U2500 ' # ╰─
+ APPLE_ICON '\u'$CODEPOINT_OF_AWESOME_APPLE # 
+ FREEBSD_ICON $'\U1F608 ' # 😈
+ LINUX_ICON '\u'$CODEPOINT_OF_AWESOME_LINUX # 
+ SUNOS_ICON '\u'$CODEPOINT_OF_AWESOME_SUN_O' ' # 
+ HOME_ICON '\u'$CODEPOINT_OF_AWESOME_HOME # 
+ HOME_SUB_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_OPEN # 
+ FOLDER_ICON '\u'$CODEPOINT_OF_AWESOME_FOLDER_O # 
+ NETWORK_ICON '\u'$CODEPOINT_OF_AWESOME_RSS # 
+ LOAD_ICON '\u'$CODEPOINT_OF_AWESOME_BAR_CHART' ' # 
+ SWAP_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD # 
+ RAM_ICON '\u'$CODEPOINT_OF_AWESOME_DASHBOARD # 
+ SERVER_ICON '\u'$CODEPOINT_OF_AWESOME_SERVER # 
+ VCS_UNTRACKED_ICON '\u'$CODEPOINT_OF_AWESOME_QUESTION_CIRCLE # 
+ VCS_UNSTAGED_ICON '\u'$CODEPOINT_OF_AWESOME_EXCLAMATION_CIRCLE # 
+ VCS_STAGED_ICON '\u'$CODEPOINT_OF_AWESOME_PLUS_CIRCLE # 
+ VCS_STASH_ICON '\u'$CODEPOINT_OF_AWESOME_INBOX' ' # 
+ VCS_INCOMING_CHANGES_ICON '\u'$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_DOWN' ' # 
+ VCS_OUTGOING_CHANGES_ICON '\u'$CODEPOINT_OF_AWESOME_ARROW_CIRCLE_UP' ' # 
+ VCS_TAG_ICON '\u'$CODEPOINT_OF_AWESOME_TAG' ' # 
+ VCS_BOOKMARK_ICON '\u'$CODEPOINT_OF_OCTICONS_BOOKMARK # 
+ VCS_COMMIT_ICON '\u'$CODEPOINT_OF_OCTICONS_GIT_COMMIT' ' # 
+ VCS_BRANCH_ICON '\u'$CODEPOINT_OF_OCTICONS_GIT_BRANCH' ' # 
+ VCS_REMOTE_BRANCH_ICON '\u'$CODEPOINT_OF_OCTICONS_REPO_PUSH # 
+ VCS_GIT_ICON '\u'$CODEPOINT_OF_AWESOME_GIT' ' # 
+ VCS_GIT_GITHUB_ICON '\u'$CODEPOINT_OF_AWESOME_GITHUB_ALT' ' # 
+ VCS_GIT_BITBUCKET_ICON '\u'$CODEPOINT_OF_AWESOME_BITBUCKET' ' # 
+ VCS_GIT_GITLAB_ICON '\u'$CODEPOINT_OF_AWESOME_GITLAB' ' # 
+ VCS_HG_ICON '\u'$CODEPOINT_OF_AWESOME_FLASK' ' # 
+ VCS_SVN_ICON '(svn) '
+ RUST_ICON $'\uE6A8' # 
+ PYTHON_ICON $'\U1F40D' # 🐍
+ SWIFT_ICON $'\uE655' # 
+ PUBLIC_IP_ICON '\u'$CODEPOINT_OF_AWESOME_GLOBE # 
+ LOCK_ICON '\u'$CODEPOINT_OF_AWESOME_LOCK # 
+ EXECUTION_TIME_ICON '\u'$CODEPOINT_OF_AWESOME_HOURGLASS_END # 
+ SSH_ICON '(ssh)'
+ )
+ ;;
'nerdfont-complete'|'nerdfont-fontconfig')
# nerd-font patched (complete) font required! See
# https://github.com/ryanoasis/nerd-fonts
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 7e7b4e11..9a146fa8 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1059,17 +1059,17 @@ prompt_ram() {
}
# rbenv information
+set_default POWERLEVEL9K_RBENV_ALWAYS false
prompt_rbenv() {
if which rbenv 2>/dev/null >&2; then
local rbenv_version_name="$(rbenv version-name)"
local rbenv_global="$(rbenv global)"
- # Don't show anything if the current Ruby is the same as the global Ruby.
- if [[ $rbenv_version_name == $rbenv_global ]]; then
- return
+ # Don't show anything if the current Ruby is the same as the global Ruby
+ # unless `POWERLEVEL9K_RBENV_ALWAYS` is set.
+ if [[ $POWERLEVEL9K_RBENV_ALWAYS == true || $rbenv_version_name != $rbenv_global ]];then
+ "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
fi
-
- "$1_prompt_segment" "$0" "$2" "red" "$DEFAULT_COLOR" "$rbenv_version_name" 'RUBY_ICON'
fi
}