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

theme seems to be working except for some annoying spacing issues

This commit is contained in:
Ben Hilburn 2014-12-04 18:52:41 -08:00
parent d9bfce94f4
commit 595d7a55c6

View file

@ -176,22 +176,23 @@ prompt_status() {
[[ -n "$symbols" ]] && left_prompt_segment black default "$symbols" [[ -n "$symbols" ]] && left_prompt_segment black default "$symbols"
} }
# Same thing as 'status' above, except for the right-side prompt
rprompt_status() { rprompt_status() {
local symbols local symbols
symbols=() symbols=()
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}" || symbols+="%{%F{green}%}✓" [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}%? ↵" || symbols+="%{%F{green}%}✓"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
[[ -n "$symbols" ]] && right_prompt_segment black default "$symbols" [[ -n "$symbols" ]] && right_prompt_segment black default "$symbols"
} }
# System time of the prompt print-out # System time
prompt_time() { prompt_time() {
right_prompt_segment white black '%D{%H:%M:%S} ' right_prompt_segment white black '%D{%H:%M:%S} '
} }
# Command number (in current history) # Command number (in local history)
prompt_history() { prompt_history() {
right_prompt_segment blue black '%h' right_prompt_segment blue black '%h'
} }
@ -201,24 +202,23 @@ prompt_rvm() {
local rvm_prompt local rvm_prompt
rvm_prompt=`rvm-prompt` rvm_prompt=`rvm-prompt`
if [ "$rvm_prompt" != "" ]; then if [ "$rvm_prompt" != "" ]; then
right_prompt_segment "240" white "$rvm_prompt " left_prompt_segment "240" white "$rvm_prompt "
fi fi
} }
## Main prompt ## Main prompt
build_left_prompt() { build_left_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv prompt_virtualenv
prompt_context prompt_context
prompt_dir prompt_dir
prompt_git prompt_git
prompt_hg prompt_hg
#prompt_rvm
left_prompt_end left_prompt_end
} }
build_right_prompt() { build_right_prompt() {
#prompt_rvm RETVAL=$?
rprompt_status rprompt_status
prompt_history prompt_history
prompt_time prompt_time