1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 17:50:09 +00:00

Merge remote-tracking branch 'dritter/dritter/various_improvements' into staging

This commit is contained in:
Ben Hilburn 2015-07-26 14:32:36 -07:00
commit 0654832da4
2 changed files with 19 additions and 9 deletions

View file

@ -50,6 +50,7 @@ this theme focus on three primary goals:
- [Special Segment Colors](#special-segment-colors) - [Special Segment Colors](#special-segment-colors)
- [Troubleshooting](#troubleshooting) - [Troubleshooting](#troubleshooting)
- [Gaps Between Segments](#gaps-between-segments) - [Gaps Between Segments](#gaps-between-segments)
- [Segments are printed in strange colors](#segments-are-printed-in-strange-colors)
- [Meta](#meta) - [Meta](#meta)
- [Kudos](#kudos) - [Kudos](#kudos)
- [Developing](#developing) - [Developing](#developing)
@ -277,8 +278,8 @@ to a certain length:
By default the time is show in 'H:M:S' format. If you want to change it, By default the time is show in 'H:M:S' format. If you want to change it,
just set another format in your `~/.zshrc`: just set another format in your `~/.zshrc`:
# Reversed time format # Output date and time with a nice symbol (awesome-terminal-font required)
POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}"
#### Unit Test Ratios #### Unit Test Ratios
@ -435,6 +436,16 @@ Thankfully, this is easy to fix. This happens if you have successfully installed
Powerline fonts, but did not make a Powerline font the default font in your Powerline fonts, but did not make a Powerline font the default font in your
terminal emulator (e.g., 'terminator', 'gnome-terminal', 'konsole', etc.,). terminal emulator (e.g., 'terminator', 'gnome-terminal', 'konsole', etc.,).
#### Segments are printed in strange colors
Besides of choosing the right color scheme for your terminal editor, you should
be aware that your terminal is capable of displaying 256 colors. You can check
that by invoking `echotc Co` in your terminal. It should show 256. If it shows
less than that, you have to set a terminal that is capable of displaying 256
colors like `xterm-256color` in your `~/.zshrc`:
TERM=xterm-256color
### Meta ### Meta
#### Kudos #### Kudos

View file

@ -26,7 +26,7 @@
# export DEFAULT_USER=<your username> # export DEFAULT_USER=<your username>
# #
# Customize the format of the time segment. Example of reverse format: # Customize the format of the time segment. Example of reverse format:
# POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}' # POWERLEVEL9K_TIME_FORMAT='%D{%S:%M:%H}'
# #
# Show the hash/changeset string in the `vcs` segment: # Show the hash/changeset string in the `vcs` segment:
# POWERLEVEL9K_SHOW_CHANGESET=true # POWERLEVEL9K_SHOW_CHANGESET=true
@ -217,8 +217,8 @@ zstyle ':vcs_info:*' enable git hg
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$VCS_FOREGROUND_COLOR}%b%c%u%m%f" VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$VCS_FOREGROUND_COLOR}%b%c%u%m%f"
zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f$VCS_DEFAULT_FORMAT" zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f$VCS_DEFAULT_FORMAT"
zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f$VCS_DEFAULT_FORMAT" zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f$VCS_DEFAULT_FORMAT"
zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f"
@ -253,7 +253,7 @@ fi
# The latter three can be omitted, # The latter three can be omitted,
left_prompt_segment() { left_prompt_segment() {
# Overwrite given background-color by user defined variable for this segment. # Overwrite given background-color by user defined variable for this segment.
# We get as first Parameter the function name, which called this function. # We get as first Parameter the function name, which called this function.
# From the given function name, we strip the "prompt_"-prefix and uppercase it. # From the given function name, we strip the "prompt_"-prefix and uppercase it.
# This is, prefixed with "POWERLEVEL9K_" and suffixed with either "_BACKGROUND" # This is, prefixed with "POWERLEVEL9K_" and suffixed with either "_BACKGROUND"
# of "_FOREGROUND", our variable name. So each new Segment should automatically # of "_FOREGROUND", our variable name. So each new Segment should automatically
@ -427,7 +427,7 @@ CURRENT_BG='NONE'
# AWS Profile # AWS Profile
prompt_aws() { prompt_aws() {
local aws_profile="$AWS_DEFAULT_PROFILE" local aws_profile="$AWS_DEFAULT_PROFILE"
if [[ -n "$aws_profile" ]]; if [[ -n "$aws_profile" ]];
then then
$1_prompt_segment "$0" red white "$AWS_ICON $aws_profile" $1_prompt_segment "$0" red white "$AWS_ICON $aws_profile"
fi fi
@ -487,7 +487,7 @@ prompt_longstatus() {
prompt_node_version() { prompt_node_version() {
local nvm_prompt=$(node -v 2>/dev/null) local nvm_prompt=$(node -v 2>/dev/null)
[[ -z "${nvm_prompt}" ]] && return [[ -z "${nvm_prompt}" ]] && return
NODE_ICON=$'\u2B22' # ⬢ NODE_ICON=$'\u2B22' # ⬢
$1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON" $1_prompt_segment "$0" "green" "white" "${nvm_prompt:1} $NODE_ICON"
} }
@ -645,7 +645,6 @@ $POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX"
RPROMPT_SUFFIX='' RPROMPT_SUFFIX=''
fi fi
RPROMPT=$RPROMPT_PREFIX"%{%f%b%k%}"'$(build_right_prompt)'"%{$reset_color%}"$RPROMPT_SUFFIX RPROMPT=$RPROMPT_PREFIX"%{%f%b%k%}"'$(build_right_prompt)'"%{$reset_color%}"$RPROMPT_SUFFIX
} }
powerlevel9k_init "$@" powerlevel9k_init "$@"