mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Added options to make it like before
This commit is contained in:
16
README.md
16
README.md
@@ -52,6 +52,16 @@ If you want to display date or non-zero-exit-code of last command next to time:
|
|||||||
POWERLINE_RIGHT_A="mixed"
|
POWERLINE_RIGHT_A="mixed"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you want to display a custom text next to time:
|
||||||
|
```
|
||||||
|
POWERLINE_RIGHT_A="Your very best text"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to change the date format to what you want:
|
||||||
|
```
|
||||||
|
POWERLINE_DATE_FORMAT="%D{%d-%m}"
|
||||||
|
```
|
||||||
|
|
||||||
If you don't want to display your username (the green or red (root) colors are still there):
|
If you don't want to display your username (the green or red (root) colors are still there):
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -64,6 +74,11 @@ If you don't want to display your hostname (the green or red (root) colors are s
|
|||||||
POWERLINE_HIDE_HOST_NAME="true"
|
POWERLINE_HIDE_HOST_NAME="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you don't want to hide git prompt status (new files, modified files, unmerged files, etc):
|
||||||
|
```
|
||||||
|
POWERLINE_HIDE_GIT_PROMPT_STATUS="true"
|
||||||
|
```
|
||||||
|
|
||||||
If you don't want the blank line before the prompt:
|
If you don't want the blank line before the prompt:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -126,3 +141,4 @@ Contribute
|
|||||||
* [itszero](https://github.com/itszero)
|
* [itszero](https://github.com/itszero)
|
||||||
* [adrienbrault](https://github.com/adrienbrault)
|
* [adrienbrault](https://github.com/adrienbrault)
|
||||||
* [mkraemer](https://github.com/mkraemer)
|
* [mkraemer](https://github.com/mkraemer)
|
||||||
|
* [wujtruj](https://github.com/wujtruj)
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
# FreeAgent puts the powerline style in zsh !
|
# FreeAgent puts the powerline style in zsh !
|
||||||
|
|
||||||
|
if [ "$POWERLINE_DATE_FORMAT" = "" ]; then
|
||||||
|
POWERLINE_DATE_FORMAT=%D{%Y-%m-%d}
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$POWERLINE_RIGHT_B" = "" ]; then
|
if [ "$POWERLINE_RIGHT_B" = "" ]; then
|
||||||
POWERLINE_RIGHT_B=%D{%H:%M:%S}
|
POWERLINE_RIGHT_B=%D{%H:%M:%S}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
|
if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
|
||||||
POWERLINE_RIGHT_A=%(?.%D{%d-%m}.%F{133}✘%?)
|
POWERLINE_RIGHT_A=%(?."$POWERLINE_DATE_FORMAT".%F{red}✘ %?)
|
||||||
elif [ "$POWERLINE_RIGHT_A" = "exit-status" ]; then
|
elif [ "$POWERLINE_RIGHT_A" = "exit-status" ]; then
|
||||||
POWERLINE_RIGHT_A=%(?.%F{118}✔%?.%F{133}✘%?)
|
POWERLINE_RIGHT_A=%(?.%F{green}✔ %?.%F{red}✘ %?)
|
||||||
elif [ "$POWERLINE_RIGHT_A" = "date" ]; then
|
elif [ "$POWERLINE_RIGHT_A" = "date" ]; then
|
||||||
POWERLINE_RIGHT_A=%D{%d-%m}
|
POWERLINE_RIGHT_A="$POWERLINE_DATE_FORMAT"
|
||||||
else
|
|
||||||
POWERLINE_RIGHT_A=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
|
if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
|
||||||
@@ -77,13 +79,16 @@ ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
|
|||||||
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
|
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
|
||||||
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
|
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
|
||||||
|
|
||||||
|
|
||||||
# if [ "$(git_prompt_info)" = "" ]; then
|
# if [ "$(git_prompt_info)" = "" ]; then
|
||||||
# POWERLINE_GIT_INFO_LEFT=""
|
# POWERLINE_GIT_INFO_LEFT=""
|
||||||
# POWERLINE_GIT_INFO_RIGHT=""
|
# POWERLINE_GIT_INFO_RIGHT=""
|
||||||
# else
|
# else
|
||||||
if [ "$POWERLINE_SHOW_GIT_ON_RIGHT" = "" ]; then
|
if [ "$POWERLINE_SHOW_GIT_ON_RIGHT" = "" ]; then
|
||||||
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
|
if [ "$POWERLINE_HIDE_GIT_PROMPT_STATUS" = "" ]; then
|
||||||
|
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
|
||||||
|
else
|
||||||
|
POWERLINE_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)%F{white}'
|
||||||
|
fi
|
||||||
POWERLINE_GIT_INFO_RIGHT=""
|
POWERLINE_GIT_INFO_RIGHT=""
|
||||||
else
|
else
|
||||||
POWERLINE_GIT_INFO_LEFT=""
|
POWERLINE_GIT_INFO_LEFT=""
|
||||||
@@ -114,7 +119,7 @@ if [ "$POWERLINE_NO_BLANK_LINE" = "" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$POWERLINE_RIGHT_A" = "" ]; then
|
if [ "$POWERLINE_RIGHT_A" = "" ]; then
|
||||||
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{yellow}"$'\ue0b2'"%k%F{black}%K{yellow} $POWERLINE_RIGHT_B %f%k"
|
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $POWERLINE_RIGHT_B %f%k"
|
||||||
else
|
else
|
||||||
RPROMPT="$POWERLINE_GIT_INFO_RIGHT%F{yellow}"$'\ue0b2'"%k%F{black}%K{yellow} $POWERLINE_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $POWERLINE_RIGHT_A %f%k"
|
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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user