aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--functions/icons.zsh5
-rwxr-xr-xpowerlevel9k.zsh-theme17
3 files changed, 21 insertions, 4 deletions
diff --git a/README.md b/README.md
index ff569d57..02defba2 100644
--- a/README.md
+++ b/README.md
@@ -604,6 +604,7 @@ customization is provided via:
|`POWERLEVEL9K_VCS_GIT_HOOKS`|`(vcs-detect-changes git-untracked git-aheadbehind git-stash git-remotebranch git-tagname)`|Layout of the segment for git repositories.|
|`POWERLEVEL9K_VCS_HG_HOOKS`|`(vcs-detect-changes)`|Layout of the segment for Mercurial repositories.|
|`POWERLEVEL9K_VCS_SVN_HOOKS`|`(vcs-detect-changes svn-detect-changes)`|Layout of the segment for SVN repositories.|
+|`POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND`|`red`|The color of the foreground font during actions (e.g., `REBASE`).|
##### vcs symbols
@@ -639,6 +640,8 @@ you are using the [ZSH Line Editor](http://zsh.sourceforge.net/Doc/Release/Zsh-L
|`POWERLEVEL9K_VI_INSERT_MODE_STRING`|`"INSERT"`|String to display while in 'Insert' mode.|
|`POWERLEVEL9K_VI_COMMAND_MODE_STRING`|`"NORMAL"`|String to display while in 'Command' mode.|
+To hide the segment entirely when in `INSERT` mode, set `POWERLEVEL9K_VI_INSERT_MODE_STRING=''`
+
#### Unit Test Ratios
The `symfony2_tests` and `rspec_stats` segments both show a ratio of "real"
diff --git a/functions/icons.zsh b/functions/icons.zsh
index e642da00..ae2c5383 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -248,6 +248,7 @@ case $POWERLEVEL9K_MODE in
'nerdfont-complete'|'nerdfont-fontconfig')
# nerd-font patched (complete) font required! See
# https://github.com/ryanoasis/nerd-fonts
+ # http://nerdfonts.com/#cheat-sheet
# Set the right locale to protect special characters
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
icons=(
@@ -298,8 +299,8 @@ case $POWERLEVEL9K_MODE in
VCS_COMMIT_ICON $'\uE729 ' # 
VCS_BRANCH_ICON $'\uF126 ' # 
VCS_REMOTE_BRANCH_ICON $'\uE728 ' # 
- VCS_GIT_ICON $'\uF113 ' # 
- VCS_GIT_GITHUB_ICON $'\uE709 ' # 
+ VCS_GIT_ICON $'\uF1D3 ' # 
+ VCS_GIT_GITHUB_ICON $'\uF113 ' # 
VCS_GIT_BITBUCKET_ICON $'\uE703 ' # 
VCS_GIT_GITLAB_ICON $'\uF296 ' # 
VCS_HG_ICON $'\uF0C3 ' # 
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index d66787c1..c0849a50 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1028,9 +1028,9 @@ prompt_load() {
# Replace comma
load_avg=${load_avg//,/.}
- if [[ "$load_avg" -gt $(bc -l <<< "${cores} * 0.7") ]]; then
+ if [[ "$load_avg" -gt $((${cores} * 0.7)) ]]; then
current_state="critical"
- elif [[ "$load_avg" -gt $(bc -l <<< "${cores} * 0.5") ]]; then
+ elif [[ "$load_avg" -gt $((${cores} * 0.5)) ]]; then
current_state="warning"
else
current_state="normal"
@@ -1442,6 +1442,7 @@ prompt_vi_mode() {
"$1_prompt_segment" "$0_NORMAL" "$2" "$DEFAULT_COLOR" "default" "$POWERLEVEL9K_VI_COMMAND_MODE_STRING"
;;
main|viins|*)
+ if [[ -z $POWERLEVEL9K_VI_INSERT_MODE_STRING ]]; then return; fi
"$1_prompt_segment" "$0_INSERT" "$2" "$DEFAULT_COLOR" "blue" "$POWERLEVEL9K_VI_INSERT_MODE_STRING"
;;
esac
@@ -1628,10 +1629,20 @@ $(print_icon 'MULTILINE_LAST_PROMPT_PREFIX')'
NEWLINE='
'
[[ $POWERLEVEL9K_PROMPT_ADD_NEWLINE == true ]] && PROMPT="$NEWLINE$PROMPT"
+
+ # Allow iTerm integration to work
+ [[ $ITERM_SHELL_INTEGRATION_INSTALLED == "Yes" ]] && PROMPT="%{$(iterm2_prompt_mark)%}$PROMPT"
+}
+
+
+zle-keymap-select () {
+ zle reset-prompt
+ zle -R
}
set_default POWERLEVEL9K_IGNORE_TERM_COLORS false
set_default POWERLEVEL9K_IGNORE_TERM_LANG false
+
prompt_powerlevel9k_setup() {
# The value below was set to better support 32-bit CPUs.
# It's the maximum _signed_ integer value on 32-bit CPUs.
@@ -1695,6 +1706,8 @@ prompt_powerlevel9k_setup() {
# prepare prompts
add-zsh-hook precmd powerlevel9k_prepare_prompts
add-zsh-hook preexec powerlevel9k_preexec
+
+ zle -N zle-keymap-select
}
prompt_powerlevel9k_teardown() {