Merge pull request #24 from kdisneur/feature/right_b_prompt_nothing

Add the ability to disable right b prompt
This commit is contained in:
Jérémy Romey
2013-08-02 08:49:18 -07:00
2 changed files with 10 additions and 0 deletions

View File

@@ -37,6 +37,12 @@ If you don't want date or time, you can choose what you want to display:
POWERLINE_RIGHT_B="date replacement"
```
Or if you don't want to display anything:
```
POWERLINE_RIGHT_B="none"
```
If you want to display date next to time:
```
POWERLINE_RIGHT_A="date"

View File

@@ -6,6 +6,8 @@ fi
if [ "$POWERLINE_RIGHT_B" = "" ]; then
POWERLINE_RIGHT_B=%D{%H:%M:%S}
elif [ "$POWERLINE_RIGHT_B" = "none" ]; then
POWERLINE_RIGHT_B=""
fi
if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
@@ -121,6 +123,8 @@ fi
if [ "$POWERLINE_DISABLE_RPROMPT" = "" ]; then
if [ "$POWERLINE_RIGHT_A" = "" ]; then
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%k"
elif [ "$POWERLINE_RIGHT_B" = "" ]; then
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{240}%K{white} $POWERLINE_RIGHT_A %f%k"
else
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"
fi