From 4602e948c98e77e49ae182f1802a4576f78bf859 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 20 Sep 2015 21:24:37 +0200 Subject: [PATCH 01/13] There is now no difference between longstatus and status any more. Just use status, and if you just want to display it conditionally set POWERLEVEL9K_STATUS_VERBOSE=false. Also here I unified the use of named color codes to make the subsegment-display work. --- README.md | 10 ++++++-- powerlevel9k.zsh-theme | 54 +++++++++++++++++++----------------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 98033e79..93bb5916 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,6 @@ currently available are: * **rbenv** - Ruby environment information (if one is active). * **rspec_stats** - Show a ratio of test classes vs code classes for RSpec. * **status** - The return code of the previous command, and status of background jobs. -* **longstatus** - Same as previous, except this creates a status segment for the *right* prompt. * **symfony2_tests** - Show a ratio of test classes vs code classes for Symfony2. * **symfony2_version** - Show the current Symfony2 version, if you are in a Symfony2-Project dir. * **time** - System time. @@ -255,7 +254,7 @@ To specify which segments you want, just add the following variables to your `~/.zshrc`. If you don't customize this, the below configuration is the default: POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs) - POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(longstatus history time) + POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status history time) #### The AWS Profile Segment @@ -321,6 +320,13 @@ segment, as well: # Output time, date, and a symbol from the "Awesome Powerline Font" set POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}" +#### Showing Status + +Usually we display always the status, and in case a command failed, the return +code of the last executed program. In case you want to display the status only +if something special happend, you can set `POWERLEVEL9K_STATUS_VERBOSE=false` +in your `~/.zshrc`. + #### Unit Test Ratios The `symfony2_tests` and `rspec_tests` segments both show a ratio of "real" diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 86fc2c42..ca293484 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -41,6 +41,7 @@ case $POWERLEVEL9K_MODE in RIGHT_SEGMENT_SEPARATOR $'\UE0B2' #  LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  + CARRIAGE_RETURN_ICON $'\U21B5' # ↵ ROOT_ICON $'\UE801' #  RUBY_ICON $'\UE847' #  AWS_ICON $'\UE895' #  @@ -88,6 +89,7 @@ case $POWERLEVEL9K_MODE in RIGHT_SEGMENT_SEPARATOR $'\uE0B2' #  LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  + CARRIAGE_RETURN_ICON $'\U21B5' # ↵ ROOT_ICON $'\u26A1' # ⚡ RUBY_ICON '' AWS_ICON 'AWS:' @@ -692,27 +694,6 @@ prompt_load() { fi } -# Right Status: (return code, root status, background jobs) -# This creates a status segment for the *right* prompt. Exact same thing as -# above - just other side. -prompt_longstatus() { - local symbols bg - symbols=() - - if [[ "$RETVAL" -ne 0 ]]; then - symbols+="%F{226}$RETVAL ↵%f" - bg="009" - else - symbols+="%F{046}$(print_icon 'OK_ICON')%f" - bg="008" - fi - - [[ "$UID" -eq 0 ]] && symbols+="%F{yellow} $(print_icon 'ROOT_ICON')%f" - [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%F{cyan}$(print_icon 'BACKGROUND_JOBS_ICON')%f" - - [[ -n "$symbols" ]] && "$1_prompt_segment" "$0" "$bg" "white" "$symbols" -} - # Node version prompt_node_version() { local nvm_prompt @@ -724,7 +705,7 @@ prompt_node_version() { # print a little OS icon prompt_os_icon() { - "$1_prompt_segment" "$0" "008" "255" "$OS_ICON" + "$1_prompt_segment" "$0" "black" "255" "$OS_ICON" } # print PHP version number @@ -764,16 +745,29 @@ prompt_rvm() { fi } -# Left Status: (return code, root status, background jobs) -# This creates a status segment for the *left* prompt +# Status: (return code, root status, background jobs) +set_default POWERLEVEL9K_STATUS_VERBOSE true prompt_status() { - local symbols + local symbols bg symbols=() - [[ "$RETVAL" -ne 0 ]] && symbols+="%{%F{red}%}$(print_icon 'FAIL_ICON')" - [[ "$UID" -eq 0 ]] && symbols+="%{%F{yellow}%} $(print_icon 'ROOT_ICON')" - [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}$(print_icon 'BACKGROUND_JOBS_ICON')" - [[ -n "$symbols" ]] && "$1_prompt_segment" "$0" "$DEFAULT_COLOR" "default" "$symbols" + if [[ "$POWERLEVEL9K_STATUS_VERBOSE" == true ]]; then + if [[ "$RETVAL" -ne 0 ]]; then + symbols+="%F{226}$RETVAL $(print_icon 'CARRIAGE_RETURN_ICON')%f" + bg="red" + else + symbols+="%F{046}$(print_icon 'OK_ICON')%f" + bg="black" + fi + else + [[ "$RETVAL" -ne 0 ]] && symbols+="%{%F{red}%}$(print_icon 'FAIL_ICON')%f" + bg="$DEFAULT_COLOR" + fi + + [[ "$UID" -eq 0 ]] && symbols+="%{%F{yellow}%} $(print_icon 'ROOT_ICON')%f" + [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}$(print_icon 'BACKGROUND_JOBS_ICON')%f" + + [[ -n "$symbols" ]] && "$1_prompt_segment" "$0" "$bg" "white" "$symbols" } # Symfony2-PHPUnit test ratio @@ -848,7 +842,7 @@ build_left_prompt() { # Right prompt build_right_prompt() { - defined POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS || POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(longstatus history time) + defined POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS || POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status history time) for element in "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[@]}"; do "prompt_$element" "right" From 58d5f9a07877c488b5b53c00dd57d9bb0c638f4e Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 20 Sep 2015 21:28:22 +0200 Subject: [PATCH 02/13] Added subsegments in flat-mode. --- powerlevel9k.zsh-theme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 86fc2c42..f302433d 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -129,6 +129,8 @@ case $POWERLEVEL9K_MODE in 'flat') icons[LEFT_SEGMENT_SEPARATOR]='' icons[RIGHT_SEGMENT_SEPARATOR]='' + icons[LEFT_SUBSEGMENT_SEPARATOR]='|' + icons[RIGHT_SUBSEGMENT_SEPARATOR]='|' ;; 'compatible') local LC_ALL="" LC_CTYPE="en_US.UTF-8" # Set the right locale to protect special characters From 2e7d0f14d2a355427609e93c32fd9f8b219db7f3 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 21 Sep 2015 18:34:43 +0200 Subject: [PATCH 03/13] Shellcheck-support for vi_mode segment & alphabetical order of prompts. --- powerlevel9k.zsh-theme | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 86fc2c42..19a8bbb3 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -576,16 +576,6 @@ prompt_context() { fi } -# Vi Mode: show editing mode (NORMAL|INSERT) -prompt_vi_mode() { - local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}" - if [[ "$mode" == "NORMAL" ]]; then - $1_prompt_segment "$0_NORMAL" "$DEFAULT_COLOR" "default" "$mode" - else - $1_prompt_segment "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode" - fi -} - # Dir: current working directory prompt_dir() { local current_path='%~' @@ -821,6 +811,16 @@ prompt_time() { "$1_prompt_segment" "$0" "$DEFAULT_COLOR_INVERTED" "$DEFAULT_COLOR" "$time_format" } +# Vi Mode: show editing mode (NORMAL|INSERT) +prompt_vi_mode() { + local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}" + if [[ "$mode" == "NORMAL" ]]; then + "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "$mode" + else + "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode" + fi +} + # Virtualenv: current working virtualenv # More information on virtualenv (Python): # https://virtualenv.pypa.io/en/latest/ From b31d0ff3950c091cb5f0aa34abc664a4790affc8 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 22 Sep 2015 18:30:59 +0200 Subject: [PATCH 04/13] Made VI-Mode plugin working again. --- powerlevel9k.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 19a8bbb3..479c6880 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -880,6 +880,11 @@ $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')" fi } +function zle-line-init zle-keymap-select { + powerlevel9k_prepare_prompts + zle reset-prompt +} + powerlevel9k_init() { # Display a warning if the terminal does not support 256 colors local term_colors @@ -902,6 +907,9 @@ powerlevel9k_init() { # prepare prompts add-zsh-hook precmd powerlevel9k_prepare_prompts + + zle -N zle-line-init + zle -N zle-keymap-select } powerlevel9k_init "$@" From fc59f06f39628ddffbad89907988551bd86f7d19 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 22 Sep 2015 18:35:42 +0200 Subject: [PATCH 05/13] code more readable. --- powerlevel9k.zsh-theme | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 479c6880..7fb283dd 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -813,12 +813,14 @@ prompt_time() { # Vi Mode: show editing mode (NORMAL|INSERT) prompt_vi_mode() { - local mode="${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}" - if [[ "$mode" == "NORMAL" ]]; then - "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "$mode" - else - "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "$mode" - fi + case ${KEYMAP} in + main) + "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "INSERT" + ;; + *) + "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "NORMAL" + ;; + esac } # Virtualenv: current working virtualenv From 0b37ca2869577426cebca6a7d15cc92f5ab51b91 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 22 Sep 2015 18:43:06 +0200 Subject: [PATCH 06/13] Added documentation. --- README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98033e79..07e16992 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,6 @@ currently available are: * **aws** - The current AWS profile, if active (more info below) * **context** - Your username and host (more info below) -* **vi_mode** - Vi editing mode (NORMAL|INSERT). * **dir** - Your current working directory. * **history** - The command number for the current line. * **ip** - Shows the current IP address. @@ -248,6 +247,7 @@ currently available are: * **symfony2_tests** - Show a ratio of test classes vs code classes for Symfony2. * **symfony2_version** - Show the current Symfony2 version, if you are in a Symfony2-Project dir. * **time** - System time. +* **vi_mode** - Vi editing mode (NORMAL|INSERT). * **virtualenv** - Your Python [VirtualEnv](https://virtualenv.pypa.io/en/latest/). * **vcs** - Information about this `git` or `hg` repository (if you are in one). @@ -330,6 +330,26 @@ is count your source files and test files, and calculate the ratio between them. Just enough to give you a quick overview about the test situation of the project you are dealing with. +#### VI-Mode Indicator + +This Segment shows the current mode of your ZSH. If you want to use your ZSH in +VI-Mode, you need to configure it separatly in your `~/.zshrc`: + + # VI-Mode + # general activation + bindkey -v + + # set some nice hotkeys + bindkey '^P' up-history + bindkey '^N' down-history + bindkey '^?' backward-delete-char + bindkey '^h' backward-delete-char + bindkey '^w' backward-kill-word + bindkey '^r' history-incremental-search-backward + + # make it more responsive + export KEYTIMEOUT=1 + #### The 'vcs' Segment By default, the `vcs` segment will provide quite a bit of information. If you From ffc0d9e162e8e80b7554a33a863e57911813c68d Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Wed, 23 Sep 2015 18:26:27 +0200 Subject: [PATCH 07/13] KEYMAP may be "main" or "viins" in VI-Mode. --- powerlevel9k.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 7fb283dd..9e3a034b 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -814,10 +814,10 @@ prompt_time() { # Vi Mode: show editing mode (NORMAL|INSERT) prompt_vi_mode() { case ${KEYMAP} in - main) + main|viins) "$1_prompt_segment" "$0_INSERT" "$DEFAULT_COLOR" "blue" "INSERT" ;; - *) + vicmd) "$1_prompt_segment" "$0_NORMAL" "$DEFAULT_COLOR" "default" "NORMAL" ;; esac From c760d3a5057698cd220caec1334403fc028f46f6 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Wed, 23 Sep 2015 18:29:42 +0200 Subject: [PATCH 08/13] Better compatibility with shellcheck.net. --- powerlevel9k.zsh-theme | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 9e3a034b..84e7cb87 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -882,7 +882,12 @@ $(print_icon 'MULTILINE_SECOND_PROMPT_PREFIX')" fi } -function zle-line-init zle-keymap-select { +function zle-line-init { + powerlevel9k_prepare_prompts + zle reset-prompt +} + +function zle-keymap-select { powerlevel9k_prepare_prompts zle reset-prompt } From 4fa3228900f7a096de8df026f062fb8e949977de Mon Sep 17 00:00:00 2001 From: v1rgul Date: Sun, 27 Sep 2015 12:17:27 +0200 Subject: [PATCH 09/13] Added awesome fontconfig support --- README.md | 5 +++++ powerlevel9k.zsh-theme | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/README.md b/README.md index a3f11cf9..52ee5cb2 100644 --- a/README.md +++ b/README.md @@ -192,8 +192,13 @@ a number of additional glyphs. You then need to indicate that you wish to use the additional glyphs by defining the following in your `~/.zshrc`: + POWERLEVEL9K_MODE='awesome-fontconfig' + +If you chose to use already patched fonts, use instead : + POWERLEVEL9K_MODE='awesome-patched' + If you choose to make use of this, your prompt will look something like this: ![](https://cloud.githubusercontent.com/assets/1544760/7959660/67612918-09fb-11e5-9ef2-2308363c3c51.png) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 3e591109..55bd44d8 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -136,6 +136,34 @@ case $POWERLEVEL9K_MODE in VCS_GIT_ICON="\uE20E " #  VCS_HG_ICON="\uE1C3 " #  ;; + 'awesome-fontconfig') + # fontconfig with awesome-font required! + # See https://github.com/gabrielelana/awesome-terminal-fonts + + LEFT_SEGMENT_SEPARATOR="\uE0B0" #  + RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  + ROOT_ICON="\u26A1" # ⚡ + RUBY_ICON="\uf219" #  + AWS_ICON="\uf1b2" #  + BACKGROUND_JOBS_ICON="\uf013 " #  + TEST_ICON="\uE891" #  + OK_ICON="\u2713" # ✓ + FAIL_ICON="\u2718" # ✘ + SYMFONY_ICON="SF" + VCS_UNTRACKED_ICON="\uf059" #  + VCS_UNSTAGED_ICON="\uf06a" #  + VCS_STAGED_ICON="\uf055" #  + VCS_STASH_ICON="\uf01c " #  + VCS_INCOMING_CHANGES="\uf01a " #  + VCS_OUTGOING_CHANGES="\uf01b " #  + VCS_TAG_ICON="\uE817 " #  + VCS_BOOKMARK_ICON="\uf001" #  + VCS_COMMIT_ICON="\uf01f " #  + VCS_BRANCH_ICON="\uf126" #  + VCS_REMOTE_BRANCH_ICON=" \uf005 " #  + VCS_GIT_ICON="\uf113 " #  + VCS_HG_ICON="\uf0c3 " #  + ;; *) # Powerline-Patched Font required! # See https://github.com/Lokaltog/powerline-fonts From 6a0eb2fb117b4e68076925f3ebcd4740e1c57828 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Mon, 28 Sep 2015 11:37:43 -0700 Subject: [PATCH 10/13] Cleaning up comments around font icon settings. --- powerlevel9k.zsh-theme | 176 ++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 89 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d33e6fab..d36d2cf9 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -5,9 +5,6 @@ # # This theme was inspired by agnoster's Theme: # https://gist.github.com/3712874 -# -# The `vcs_info` hooks in this file are from Tom Upton: -# https://github.com/tupton/dotfiles/blob/master/zsh/zshrc ################################################################ ################################################################ @@ -33,100 +30,100 @@ typeset -gAH icons case $POWERLEVEL9K_MODE in 'flat'|'awesome-patched') - # Awesome-Patched Font required! - # See https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched - local LC_ALL="" LC_CTYPE="en_US.UTF-8" # Set the right locale to protect special characters + # Awesome-Patched Font required! See: + # https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/patched + # Set the right locale to protect special characters + local LC_ALL="" LC_CTYPE="en_US.UTF-8" icons=( - LEFT_SEGMENT_SEPARATOR $'\UE0B0' #  - RIGHT_SEGMENT_SEPARATOR $'\UE0B2' #  - LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  - RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  - CARRIAGE_RETURN_ICON $'\U21B5' # ↵ - ROOT_ICON $'\UE801' #  - RUBY_ICON $'\UE847' #  - AWS_ICON $'\UE895' #  - BACKGROUND_JOBS_ICON $'\UE82F ' #  - TEST_ICON $'\UE891' #  - OK_ICON $'\U2713' # ✓ - FAIL_ICON $'\U2718' # ✘ + LEFT_SEGMENT_SEPARATOR $'\UE0B0' #  + RIGHT_SEGMENT_SEPARATOR $'\UE0B2' #  + LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  + RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  + CARRIAGE_RETURN_ICON $'\U21B5' # ↵ + ROOT_ICON $'\UE801' #  + RUBY_ICON $'\UE847' #  + AWS_ICON $'\UE895' #  + BACKGROUND_JOBS_ICON $'\UE82F ' #  + TEST_ICON $'\UE891' #  + OK_ICON $'\U2713' # ✓ + FAIL_ICON $'\U2718' # ✘ SYMFONY_ICON 'SF' - NODE_ICON $'\U2B22' # ⬢ + NODE_ICON $'\U2B22' # ⬢ MULTILINE_FIRST_PROMPT_PREFIX $'\U256D'$'\U2500' MULTILINE_SECOND_PROMPT_PREFIX $'\U2570'$'\U2500 ' - APPLE_ICON $'\UE26E' #  - FREEBSD_ICON $'\U1F608 ' # 😈 - LINUX_ICON $'\UE271' #  - SUNOS_ICON $'\U1F31E ' # 🌞 - HOME_ICON $'\UE12C ' #  - NETWORK_ICON $'\UE1AD ' #  - LOAD_ICON $'\UE190 ' #  - #RAM_ICON $'\UE87D' #  - RAM_ICON $'\UE1E2 ' #  - VCS_UNTRACKED_ICON $'\UE16C' #  - VCS_UNSTAGED_ICON $'\UE17C' #  - VCS_STAGED_ICON $'\UE168' #  - VCS_STASH_ICON $'\UE133 ' #  - #VCS_INCOMING_CHANGES_ICON $'\UE1EB ' #  - #VCS_INCOMING_CHANGES_ICON $'\UE80D ' #  - VCS_INCOMING_CHANGES_ICON $'\UE131 ' #  - #VCS_OUTGOING_CHANGES_ICON $'\UE1EC ' #  - #VCS_OUTGOING_CHANGES_ICON $'\UE80E ' #  - VCS_OUTGOING_CHANGES_ICON $'\UE132 ' #  - VCS_TAG_ICON $'\UE817 ' #  - VCS_BOOKMARK_ICON $'\UE87B' #  - VCS_COMMIT_ICON $'\UE821 ' #  - VCS_BRANCH_ICON $'\UE220' #  - VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' #  - VCS_GIT_ICON $'\UE20E ' #  - VCS_HG_ICON $'\UE1C3 ' #  + APPLE_ICON $'\UE26E' #  + FREEBSD_ICON $'\U1F608 ' # 😈 + LINUX_ICON $'\UE271' #  + SUNOS_ICON $'\U1F31E ' # 🌞 + HOME_ICON $'\UE12C ' #  + NETWORK_ICON $'\UE1AD ' #  + LOAD_ICON $'\UE190 ' #  + #RAM_ICON $'\UE87D' #  + RAM_ICON $'\UE1E2 ' #  + VCS_UNTRACKED_ICON $'\UE16C' #  + VCS_UNSTAGED_ICON $'\UE17C' #  + VCS_STAGED_ICON $'\UE168' #  + VCS_STASH_ICON $'\UE133 ' #  + #VCS_INCOMING_CHANGES_ICON $'\UE1EB ' #  + #VCS_INCOMING_CHANGES_ICON $'\UE80D ' #  + VCS_INCOMING_CHANGES_ICON $'\UE131 ' #  + #VCS_OUTGOING_CHANGES_ICON $'\UE1EC ' #  + #VCS_OUTGOING_CHANGES_ICON $'\UE80E ' #  + VCS_OUTGOING_CHANGES_ICON $'\UE132 ' #  + VCS_TAG_ICON $'\UE817 ' #  + VCS_BOOKMARK_ICON $'\UE87B' #  + VCS_COMMIT_ICON $'\UE821 ' #  + VCS_BRANCH_ICON $'\UE220' #  + VCS_REMOTE_BRANCH_ICON ' '$'\UE804 ' #  + VCS_GIT_ICON $'\UE20E ' #  + VCS_HG_ICON $'\UE1C3 ' #  ) ;; 'awesome-fontconfig') # fontconfig with awesome-font required! # See https://github.com/gabrielelana/awesome-terminal-fonts - - LEFT_SEGMENT_SEPARATOR="\uE0B0" #  - RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  - ROOT_ICON="\u26A1" # ⚡ - RUBY_ICON="\uf219" #  - AWS_ICON="\uf1b2" #  - BACKGROUND_JOBS_ICON="\uf013 " #  - TEST_ICON="\uE891" #  - OK_ICON="\u2713" # ✓ - FAIL_ICON="\u2718" # ✘ + LEFT_SEGMENT_SEPARATOR="\uE0B0" #  + RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  + ROOT_ICON="\u26A1" # ⚡ + RUBY_ICON="\uf219" #  + AWS_ICON="\uf1b2" #  + BACKGROUND_JOBS_ICON="\uf013 " #  + TEST_ICON="\uE891" #  + OK_ICON="\u2713" # ✓ + FAIL_ICON="\u2718" # ✘ SYMFONY_ICON="SF" - VCS_UNTRACKED_ICON="\uf059" #  - VCS_UNSTAGED_ICON="\uf06a" #  - VCS_STAGED_ICON="\uf055" #  - VCS_STASH_ICON="\uf01c " #  - VCS_INCOMING_CHANGES="\uf01a " #  - VCS_OUTGOING_CHANGES="\uf01b " #  - VCS_TAG_ICON="\uE817 " #  - VCS_BOOKMARK_ICON="\uf001" #  - VCS_COMMIT_ICON="\uf01f " #  - VCS_BRANCH_ICON="\uf126" #  - VCS_REMOTE_BRANCH_ICON=" \uf005 " #  - VCS_GIT_ICON="\uf113 " #  - VCS_HG_ICON="\uf0c3 " #  + VCS_UNTRACKED_ICON="\uf059" #  + VCS_UNSTAGED_ICON="\uf06a" #  + VCS_STAGED_ICON="\uf055" #  + VCS_STASH_ICON="\uf01c " #  + VCS_INCOMING_CHANGES="\uf01a " #  + VCS_OUTGOING_CHANGES="\uf01b " #  + VCS_TAG_ICON="\uE817 " #  + VCS_BOOKMARK_ICON="\uf001" #  + VCS_COMMIT_ICON="\uf01f " #  + VCS_BRANCH_ICON="\uf126" #  + VCS_REMOTE_BRANCH_ICON=" \uf005 " #  + VCS_GIT_ICON="\uf113 " #  + VCS_HG_ICON="\uf0c3 " #  ;; *) # Powerline-Patched Font required! # See https://github.com/Lokaltog/powerline-fonts icons=( - LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  - RIGHT_SEGMENT_SEPARATOR $'\uE0B2' #  - LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  - RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  - CARRIAGE_RETURN_ICON $'\U21B5' # ↵ - ROOT_ICON $'\u26A1' # ⚡ + LEFT_SEGMENT_SEPARATOR $'\uE0B0' #  + RIGHT_SEGMENT_SEPARATOR $'\uE0B2' #  + LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  + RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  + CARRIAGE_RETURN_ICON $'\U21B5' # ↵ + ROOT_ICON $'\u26A1' # ⚡ RUBY_ICON '' AWS_ICON 'AWS:' - BACKGROUND_JOBS_ICON $'\u2699' # ⚙ + BACKGROUND_JOBS_ICON $'\u2699' # ⚙ TEST_ICON '' - OK_ICON $'\u2713' # ✓ - FAIL_ICON $'\u2718' # ✘ + OK_ICON $'\u2713' # ✓ + FAIL_ICON $'\u2718' # ✘ SYMFONY_ICON 'SF' - NODE_ICON $'\u2B22' # ⬢ + NODE_ICON $'\u2B22' # ⬢ MULTILINE_FIRST_PROMPT_PREFIX $'\u256D'$'\u2500' MULTILINE_SECOND_PROMPT_PREFIX $'\u2570'$'\u2500 ' APPLE_ICON 'OSX' @@ -138,16 +135,16 @@ case $POWERLEVEL9K_MODE in LOAD_ICON 'L' RAM_ICON 'RAM' VCS_UNTRACKED_ICON '?' - VCS_UNSTAGED_ICON $'\u25CF' # ● - VCS_STAGED_ICON $'\u271A' # ✚ - VCS_STASH_ICON $'\u235F' # ⍟ - VCS_INCOMING_CHANGES_ICON $'\u2193' # ↓ - VCS_OUTGOING_CHANGES_ICON $'\u2191' # ↑ + VCS_UNSTAGED_ICON $'\u25CF' # ● + VCS_STAGED_ICON $'\u271A' # ✚ + VCS_STASH_ICON $'\u235F' # ⍟ + VCS_INCOMING_CHANGES_ICON $'\u2193' # ↓ + VCS_OUTGOING_CHANGES_ICON $'\u2191' # ↑ VCS_TAG_ICON '' - VCS_BOOKMARK_ICON $'\u263F' # ☿ + VCS_BOOKMARK_ICON $'\u263F' # ☿ VCS_COMMIT_ICON '' - VCS_BRANCH_ICON $'\uE0A0 ' #  - VCS_REMOTE_BRANCH_ICON $'\u2192' # → + VCS_BRANCH_ICON $'\uE0A0 ' #  + VCS_REMOTE_BRANCH_ICON $'\u2192' # → VCS_GIT_ICON '' VCS_HG_ICON '' ) @@ -163,9 +160,10 @@ case $POWERLEVEL9K_MODE in icons[RIGHT_SUBSEGMENT_SEPARATOR]='|' ;; 'compatible') - local LC_ALL="" LC_CTYPE="en_US.UTF-8" # Set the right locale to protect special characters - icons[LEFT_SEGMENT_SEPARATOR]=$'\u2B80' # ⮀ - icons[RIGHT_SEGMENT_SEPARATOR]=$'\u2B82' # ⮂ + # Set the right locale to protect special characters + local LC_ALL="" LC_CTYPE="en_US.UTF-8" + icons[LEFT_SEGMENT_SEPARATOR]=$'\u2B80' # ⮀ + icons[RIGHT_SEGMENT_SEPARATOR]=$'\u2B82' # ⮂ icons[VCS_BRANCH_ICON]='@' ;; esac From 5c09cf3e27b0bdaea765987ce29dae4b5e727930 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Mon, 28 Sep 2015 11:42:20 -0700 Subject: [PATCH 11/13] Minor comment addition for system load prompt segment. --- powerlevel9k.zsh-theme | 1 + 1 file changed, 1 insertion(+) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d36d2cf9..2072691d 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -209,6 +209,7 @@ function print_icon() { fi } +# Converts large memory values into a human-readable unit (e.g., bytes --> GB) printSizeHumanReadable() { local size=$1 local extension From 60fc0cae7047d9ad2f38c839c2ddb8571fa1eee7 Mon Sep 17 00:00:00 2001 From: v1rgul Date: Tue, 29 Sep 2015 00:43:06 +0200 Subject: [PATCH 12/13] Font Awesome fontconfig new icons --- powerlevel9k.zsh-theme | 66 ++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 2072691d..8431d5f9 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -80,31 +80,47 @@ case $POWERLEVEL9K_MODE in ) ;; 'awesome-fontconfig') - # fontconfig with awesome-font required! - # See https://github.com/gabrielelana/awesome-terminal-fonts - LEFT_SEGMENT_SEPARATOR="\uE0B0" #  - RIGHT_SEGMENT_SEPARATOR="\uE0B2" #  - ROOT_ICON="\u26A1" # ⚡ - RUBY_ICON="\uf219" #  - AWS_ICON="\uf1b2" #  - BACKGROUND_JOBS_ICON="\uf013 " #  - TEST_ICON="\uE891" #  - OK_ICON="\u2713" # ✓ - FAIL_ICON="\u2718" # ✘ - SYMFONY_ICON="SF" - VCS_UNTRACKED_ICON="\uf059" #  - VCS_UNSTAGED_ICON="\uf06a" #  - VCS_STAGED_ICON="\uf055" #  - VCS_STASH_ICON="\uf01c " #  - VCS_INCOMING_CHANGES="\uf01a " #  - VCS_OUTGOING_CHANGES="\uf01b " #  - VCS_TAG_ICON="\uE817 " #  - VCS_BOOKMARK_ICON="\uf001" #  - VCS_COMMIT_ICON="\uf01f " #  - VCS_BRANCH_ICON="\uf126" #  - VCS_REMOTE_BRANCH_ICON=" \uf005 " #  - VCS_GIT_ICON="\uf113 " #  - VCS_HG_ICON="\uf0c3 " #  + # fontconfig with awesome-font required! See + # https://github.com/gabrielelana/awesome-terminal-fonts + icons=( + LEFT_SEGMENT_SEPARATOR $'\UE0B0' #  + RIGHT_SEGMENT_SEPARATOR $'\UE0B2' #  + LEFT_SUBSEGMENT_SEPARATOR $'\UE0B1' #  + RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' #  + CARRIAGE_RETURN_ICON $'\U21B5' # ↵ + ROOT_ICON $'\uF201' #  + RUBY_ICON $'\UF247' #  + AWS_ICON $'\UF296' #  + BACKGROUND_JOBS_ICON $'\UE82F ' #  + TEST_ICON $'\UF291' #  + OK_ICON $'\UF23A' #  + FAIL_ICON $'\UF281' #  + SYMFONY_ICON 'SF' + NODE_ICON $'\U2B22' # ⬢ + MULTILINE_FIRST_PROMPT_PREFIX $'\U256D'$'\U2500' # ╭─ + MULTILINE_SECOND_PROMPT_PREFIX $'\U2570'$'\U2500 ' # ╰─ + APPLE_ICON $'\UF179' #  + FREEBSD_ICON $'\U1F608 ' # 😈 + LINUX_ICON $'\UF17C' #  + SUNOS_ICON $'\UF185 ' #  + HOME_ICON $'\UF015 ' #  + NETWORK_ICON $'\UF09E ' #  + LOAD_ICON $'\UF080 ' #  + RAM_ICON $'\UF0E4' #  + VCS_UNTRACKED_ICON $'\UF059' #  + VCS_UNSTAGED_ICON $'\UF06A' #  + VCS_STAGED_ICON $'\UF055' #  + VCS_STASH_ICON $'\UF01C ' #  + VCS_INCOMING_CHANGES_ICON $'\UF01A ' #  + VCS_OUTGOING_CHANGES_ICON $'\UF01V ' #  + VCS_TAG_ICON $'\UF217 ' #  + VCS_BOOKMARK_ICON $'\UF27B' #  + VCS_COMMIT_ICON $'\UF221 ' #  + VCS_BRANCH_ICON $'\UF126' #  + VCS_REMOTE_BRANCH_ICON ' '$'\UF204 ' #  + VCS_GIT_ICON $'\UF113 ' #  + VCS_HG_ICON $'\UF0C3 ' #  + ) ;; *) # Powerline-Patched Font required! From 7394608d5621d41f7211032ab1048a313d1dee7e Mon Sep 17 00:00:00 2001 From: v1rgul Date: Tue, 29 Sep 2015 01:35:17 +0200 Subject: [PATCH 13/13] Font Awesome fontconfig new icons (fixed errors) --- powerlevel9k.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 powerlevel9k.zsh-theme diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme old mode 100644 new mode 100755 index 8431d5f9..0c69a02e --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -91,7 +91,7 @@ case $POWERLEVEL9K_MODE in ROOT_ICON $'\uF201' #  RUBY_ICON $'\UF247' #  AWS_ICON $'\UF296' #  - BACKGROUND_JOBS_ICON $'\UE82F ' #  + BACKGROUND_JOBS_ICON $'\UF013 ' #  TEST_ICON $'\UF291' #  OK_ICON $'\UF23A' #  FAIL_ICON $'\UF281' #  @@ -112,7 +112,7 @@ case $POWERLEVEL9K_MODE in VCS_STAGED_ICON $'\UF055' #  VCS_STASH_ICON $'\UF01C ' #  VCS_INCOMING_CHANGES_ICON $'\UF01A ' #  - VCS_OUTGOING_CHANGES_ICON $'\UF01V ' #  + VCS_OUTGOING_CHANGES_ICON $'\UF01B ' #  VCS_TAG_ICON $'\UF217 ' #  VCS_BOOKMARK_ICON $'\UF27B' #  VCS_COMMIT_ICON $'\UF221 ' # 