mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 11:50:38 +01:00
Renames the project to "Bullet Train"
This commit is contained in:
52
README.md
52
README.md
@@ -1,7 +1,7 @@
|
|||||||
# Powerline for oh-my-zsh
|
# Bullet Train for oh-my-zsh
|
||||||
|
|
||||||
<img
|
<img
|
||||||
src="http://raw.github.com/caiogondim/oh-my-zsh-powerline-theme/master/img/icon.png"
|
src="http://raw.github.com/caiogondim/bullet-train-oh-my-zsh-theme/master/img/icon.png"
|
||||||
width="256"
|
width="256"
|
||||||
align="right"
|
align="right"
|
||||||
/>
|
/>
|
||||||
@@ -24,7 +24,7 @@ Currently a **work in progress**.
|
|||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Set Up
|
## Set Up
|
||||||
@@ -52,96 +52,96 @@ By default, at the right of the powerline are displayed the date and the time.
|
|||||||
If you don't want date or time, you can choose what you want to display:
|
If you don't want date or time, you can choose what you want to display:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_B="date replacement"
|
BULLETTRAIN_RIGHT_B="date replacement"
|
||||||
```
|
```
|
||||||
|
|
||||||
Or if you don't want to display anything:
|
Or if you don't want to display anything:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_B="none"
|
BULLETTRAIN_RIGHT_B="none"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to display date next to time:
|
If you want to display date next to time:
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_A="date"
|
BULLETTRAIN_RIGHT_A="date"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to display exit-code of last command next to time:
|
If you want to display exit-code of last command next to time:
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_A="exit-status"
|
BULLETTRAIN_RIGHT_A="exit-status"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to display date or non-zero-exit-code of last command next to time:
|
If you want to display date or non-zero-exit-code of last command next to time:
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_A="mixed"
|
BULLETTRAIN_RIGHT_A="mixed"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to display a custom text next to time:
|
If you want to display a custom text next to time:
|
||||||
```
|
```
|
||||||
POWERLINE_RIGHT_A="Your very best text"
|
BULLETTRAIN_RIGHT_A="Your very best text"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to change the date format to what you want:
|
If you want to change the date format to what you want:
|
||||||
```
|
```
|
||||||
POWERLINE_DATE_FORMAT="%D{%d-%m}"
|
BULLETTRAIN_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):
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_HIDE_USER_NAME="true"
|
BULLETTRAIN_HIDE_USER_NAME="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't want to display your hostname (the green or red (root) colors are still there):
|
If you don't want to display your hostname (the green or red (root) colors are still there):
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_HIDE_HOST_NAME="true"
|
BULLETTRAIN_HIDE_HOST_NAME="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to hide git prompt status (new files, modified files, unmerged files, etc):
|
If you want to hide git prompt status (new files, modified files, unmerged files, etc):
|
||||||
```
|
```
|
||||||
POWERLINE_HIDE_GIT_PROMPT_STATUS="true"
|
BULLETTRAIN_HIDE_GIT_PROMPT_STATUS="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to hide the right hand side prompt completely:
|
If you want to hide the right hand side prompt completely:
|
||||||
```
|
```
|
||||||
POWERLINE_DISABLE_RPROMPT="true"
|
BULLETTRAIN_DISABLE_RPROMPT="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't want the blank line before the prompt:
|
If you don't want the blank line before the prompt:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_NO_BLANK_LINE="true"
|
BULLETTRAIN_NO_BLANK_LINE="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want full path:
|
If you want full path:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_FULL_CURRENT_PATH="true"
|
BULLETTRAIN_FULL_CURRENT_PATH="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want git info on right instead of left:
|
If you want git info on right instead of left:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_SHOW_GIT_ON_RIGHT="true"
|
BULLETTRAIN_SHOW_GIT_ON_RIGHT="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to tell if you are in a remote SSH session:
|
If you want to tell if you are in a remote SSH session:
|
||||||
|
|
||||||
```
|
```
|
||||||
POWERLINE_DETECT_SSH="true"
|
BULLETTRAIN_DETECT_SSH="true"
|
||||||
```
|
```
|
||||||
|
|
||||||
Also you can change the icons of GIT info, default values are:
|
Also you can change the icons of GIT info, default values are:
|
||||||
```
|
```
|
||||||
POWERLINE_GIT_CLEAN="✔"
|
BULLETTRAIN_GIT_CLEAN="✔"
|
||||||
POWERLINE_GIT_DIRTY="✘"
|
BULLETTRAIN_GIT_DIRTY="✘"
|
||||||
POWERLINE_GIT_ADDED="%F{green}✚%F{black}"
|
BULLETTRAIN_GIT_ADDED="%F{green}✚%F{black}"
|
||||||
POWERLINE_GIT_MODIFIED="%F{blue}✹%F{black}"
|
BULLETTRAIN_GIT_MODIFIED="%F{blue}✹%F{black}"
|
||||||
POWERLINE_GIT_DELETED="%F{red}✖%F{black}"
|
BULLETTRAIN_GIT_DELETED="%F{red}✖%F{black}"
|
||||||
POWERLINE_GIT_UNTRACKED="%F{yellow}✭%F{black}"
|
BULLETTRAIN_GIT_UNTRACKED="%F{yellow}✭%F{black}"
|
||||||
POWERLINE_GIT_RENAMED="➜"
|
BULLETTRAIN_GIT_RENAMED="➜"
|
||||||
POWERLINE_GIT_UNMERGED="═"
|
BULLETTRAIN_GIT_UNMERGED="═"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
131
bullet-train.zsh-theme
Normal file
131
bullet-train.zsh-theme
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
# FreeAgent puts the powerline style in zsh !
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_DATE_FORMAT" = "" ]; then
|
||||||
|
BULLETTRAIN_DATE_FORMAT=%D{%Y-%m-%d}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_RIGHT_B" = "" ]; then
|
||||||
|
BULLETTRAIN_RIGHT_B=%D{%H:%M:%S}
|
||||||
|
elif [ "$BULLETTRAIN_RIGHT_B" = "none" ]; then
|
||||||
|
BULLETTRAIN_RIGHT_B=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_RIGHT_A" = "mixed" ]; then
|
||||||
|
BULLETTRAIN_RIGHT_A=%(?."$BULLETTRAIN_DATE_FORMAT".%F{red}✘ %?)
|
||||||
|
elif [ "$BULLETTRAIN_RIGHT_A" = "exit-status" ]; then
|
||||||
|
BULLETTRAIN_RIGHT_A=%(?.%F{green}✔ %?.%F{red}✘ %?)
|
||||||
|
elif [ "$BULLETTRAIN_RIGHT_A" = "date" ]; then
|
||||||
|
BULLETTRAIN_RIGHT_A="$BULLETTRAIN_DATE_FORMAT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_HIDE_USER_NAME" = "" ] && [ "$BULLETTRAIN_HIDE_HOST_NAME" = "" ]; then
|
||||||
|
BULLETTRAIN_USER_NAME="%n@%M"
|
||||||
|
elif [ "$BULLETTRAIN_HIDE_USER_NAME" != "" ] && [ "$BULLETTRAIN_HIDE_HOST_NAME" = "" ]; then
|
||||||
|
BULLETTRAIN_USER_NAME="@%M"
|
||||||
|
elif [ "$BULLETTRAIN_HIDE_USER_NAME" = "" ] && [ "$BULLETTRAIN_HIDE_HOST_NAME" != "" ]; then
|
||||||
|
BULLETTRAIN_USER_NAME="%n"
|
||||||
|
else
|
||||||
|
BULLETTRAIN_USER_NAME=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
BULLETTRAIN_CURRENT_PATH="%d"
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_FULL_CURRENT_PATH" = "" ]; then
|
||||||
|
BULLETTRAIN_CURRENT_PATH="%1~"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_CLEAN" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_CLEAN="✔"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_DIRTY" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_DIRTY="✘"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_ADDED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_ADDED="%F{green}✚%F{black}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_MODIFIED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_MODIFIED="%F{blue}✹%F{black}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_DELETED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_DELETED="%F{red}✖%F{black}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_UNTRACKED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_UNTRACKED="%F{yellow}✭%F{black}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_RENAMED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_RENAMED="➜"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_GIT_UNMERGED" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_UNMERGED="═"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" \ue0a0 "
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=" $BULLETTRAIN_GIT_DIRTY"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=" $BULLETTRAIN_GIT_CLEAN"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED=" $BULLETTRAIN_GIT_ADDED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED=" $BULLETTRAIN_GIT_MODIFIED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED=" $BULLETTRAIN_GIT_DELETED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED=" $BULLETTRAIN_GIT_UNTRACKED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED=" $BULLETTRAIN_GIT_RENAMED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED=" $BULLETTRAIN_GIT_UNMERGED"
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
|
||||||
|
|
||||||
|
# if [ "$(git_prompt_info)" = "" ]; then
|
||||||
|
# BULLETTRAIN_GIT_INFO_LEFT=""
|
||||||
|
# BULLETTRAIN_GIT_INFO_RIGHT=""
|
||||||
|
# else
|
||||||
|
if [ "$BULLETTRAIN_SHOW_GIT_ON_RIGHT" = "" ]; then
|
||||||
|
if [ "$BULLETTRAIN_HIDE_GIT_PROMPT_STATUS" = "" ]; then
|
||||||
|
BULLETTRAIN_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)$(git_prompt_status)%F{white}'
|
||||||
|
else
|
||||||
|
BULLETTRAIN_GIT_INFO_LEFT=" %F{blue}%K{white}"$'\ue0b0'"%F{white}%F{black}%K{white}"$'$(git_prompt_info)%F{white}'
|
||||||
|
fi
|
||||||
|
BULLETTRAIN_GIT_INFO_RIGHT=""
|
||||||
|
else
|
||||||
|
BULLETTRAIN_GIT_INFO_LEFT=""
|
||||||
|
BULLETTRAIN_GIT_INFO_RIGHT="%F{white}"$'\ue0b2'"%F{black}%K{white}"$'$(git_prompt_info)'" %K{white}"
|
||||||
|
fi
|
||||||
|
# fi
|
||||||
|
|
||||||
|
if [ $(id -u) -eq 0 ]; then
|
||||||
|
BULLETTRAIN_SEC1_BG=%K{red}
|
||||||
|
BULLETTRAIN_SEC1_FG=%F{red}
|
||||||
|
else
|
||||||
|
BULLETTRAIN_SEC1_BG=%K{green}
|
||||||
|
BULLETTRAIN_SEC1_FG=%F{green}
|
||||||
|
fi
|
||||||
|
BULLETTRAIN_SEC1_TXT=%F{black}
|
||||||
|
if [ "$BULLETTRAIN_DETECT_SSH" != "" ]; then
|
||||||
|
if [ -n "$SSH_CLIENT" ]; then
|
||||||
|
BULLETTRAIN_SEC1_BG=%K{red}
|
||||||
|
BULLETTRAIN_SEC1_FG=%F{red}
|
||||||
|
BULLETTRAIN_SEC1_TXT=%F{white}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
PROMPT="$BULLETTRAIN_SEC1_BG$BULLETTRAIN_SEC1_TXT $BULLETTRAIN_USER_NAME %k%f$BULLETTRAIN_SEC1_FG%K{blue}"$'\ue0b0'"%k%f%F{white}%K{blue} "$BULLETTRAIN_CURRENT_PATH"%F{blue}"$BULLETTRAIN_GIT_INFO_LEFT" %k"$'\ue0b0'"%f "
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_NO_BLANK_LINE" = "" ]; then
|
||||||
|
PROMPT="
|
||||||
|
"$PROMPT
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BULLETTRAIN_DISABLE_RPROMPT" = "" ]; then
|
||||||
|
if [ "$BULLETTRAIN_RIGHT_A" = "" ]; then
|
||||||
|
RPROMPT="$BULLETTRAIN_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $BULLETTRAIN_RIGHT_B %f%k"
|
||||||
|
elif [ "$BULLETTRAIN_RIGHT_B" = "" ]; then
|
||||||
|
RPROMPT="$BULLETTRAIN_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{240}%K{white} $BULLETTRAIN_RIGHT_A %f%k"
|
||||||
|
else
|
||||||
|
RPROMPT="$BULLETTRAIN_GIT_INFO_RIGHT%F{white}"$'\ue0b2'"%k%F{black}%K{white} $BULLETTRAIN_RIGHT_B %f%F{240}"$'\ue0b2'"%f%k%K{240}%F{255} $BULLETTRAIN_RIGHT_A %f%k"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "Creating symlink from here to your oh-my-zsh themes path..."
|
|
||||||
|
|
||||||
ln -f powerline.zsh-theme ~/.oh-my-zsh/themes/powerline.zsh-theme
|
|
||||||
|
|
||||||
echo "
|
|
||||||
Done ! (the symlink is ~/.oh-my-zsh/themes/powerline.zsh-theme)
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Options:
|
|
||||||
All options must be overridden in your .zshrc file.
|
|
||||||
See README.md for more info.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
Vim Powerline patched font: See Powerline for vim for more info.
|
|
||||||
Z shell (zsh): See oh-my-zsh for more info.
|
|
||||||
Make sure terminal is using 256-colors mode with export TERM=\"xterm-256color\"".
|
|
||||||
2
makefile
2
makefile
@@ -4,4 +4,4 @@ install:
|
|||||||
|
|
||||||
# Symlinks the theme for easier development
|
# Symlinks the theme for easier development
|
||||||
link:
|
link:
|
||||||
ln -s `pwd`/powerline.zsh-theme ~/.oh-my-zsh/themes/
|
ln -s `pwd`/bullet-train.zsh-theme ~/.oh-my-zsh/themes/
|
||||||
|
|||||||
@@ -1,131 +0,0 @@
|
|||||||
# 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
|
|
||||||
POWERLINE_RIGHT_B=%D{%H:%M:%S}
|
|
||||||
elif [ "$POWERLINE_RIGHT_B" = "none" ]; then
|
|
||||||
POWERLINE_RIGHT_B=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_RIGHT_A" = "mixed" ]; then
|
|
||||||
POWERLINE_RIGHT_A=%(?."$POWERLINE_DATE_FORMAT".%F{red}✘ %?)
|
|
||||||
elif [ "$POWERLINE_RIGHT_A" = "exit-status" ]; then
|
|
||||||
POWERLINE_RIGHT_A=%(?.%F{green}✔ %?.%F{red}✘ %?)
|
|
||||||
elif [ "$POWERLINE_RIGHT_A" = "date" ]; then
|
|
||||||
POWERLINE_RIGHT_A="$POWERLINE_DATE_FORMAT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
|
|
||||||
POWERLINE_USER_NAME="%n@%M"
|
|
||||||
elif [ "$POWERLINE_HIDE_USER_NAME" != "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
|
|
||||||
POWERLINE_USER_NAME="@%M"
|
|
||||||
elif [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" != "" ]; then
|
|
||||||
POWERLINE_USER_NAME="%n"
|
|
||||||
else
|
|
||||||
POWERLINE_USER_NAME=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
POWERLINE_CURRENT_PATH="%d"
|
|
||||||
|
|
||||||
if [ "$POWERLINE_FULL_CURRENT_PATH" = "" ]; then
|
|
||||||
POWERLINE_CURRENT_PATH="%1~"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_CLEAN" = "" ]; then
|
|
||||||
POWERLINE_GIT_CLEAN="✔"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_DIRTY" = "" ]; then
|
|
||||||
POWERLINE_GIT_DIRTY="✘"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_ADDED" = "" ]; then
|
|
||||||
POWERLINE_GIT_ADDED="%F{green}✚%F{black}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_MODIFIED" = "" ]; then
|
|
||||||
POWERLINE_GIT_MODIFIED="%F{blue}✹%F{black}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_DELETED" = "" ]; then
|
|
||||||
POWERLINE_GIT_DELETED="%F{red}✖%F{black}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_UNTRACKED" = "" ]; then
|
|
||||||
POWERLINE_GIT_UNTRACKED="%F{yellow}✭%F{black}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_RENAMED" = "" ]; then
|
|
||||||
POWERLINE_GIT_RENAMED="➜"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$POWERLINE_GIT_UNMERGED" = "" ]; then
|
|
||||||
POWERLINE_GIT_UNMERGED="═"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX=" \ue0a0 "
|
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY=" $POWERLINE_GIT_DIRTY"
|
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=" $POWERLINE_GIT_CLEAN"
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_ADDED=" $POWERLINE_GIT_ADDED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_MODIFIED=" $POWERLINE_GIT_MODIFIED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_DELETED=" $POWERLINE_GIT_DELETED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNTRACKED=" $POWERLINE_GIT_UNTRACKED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_RENAMED=" $POWERLINE_GIT_RENAMED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNMERGED=" $POWERLINE_GIT_UNMERGED"
|
|
||||||
ZSH_THEME_GIT_PROMPT_AHEAD=" ⬆"
|
|
||||||
ZSH_THEME_GIT_PROMPT_BEHIND=" ⬇"
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIVERGED=" ⬍"
|
|
||||||
|
|
||||||
# if [ "$(git_prompt_info)" = "" ]; then
|
|
||||||
# POWERLINE_GIT_INFO_LEFT=""
|
|
||||||
# POWERLINE_GIT_INFO_RIGHT=""
|
|
||||||
# else
|
|
||||||
if [ "$POWERLINE_SHOW_GIT_ON_RIGHT" = "" ]; then
|
|
||||||
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=""
|
|
||||||
else
|
|
||||||
POWERLINE_GIT_INFO_LEFT=""
|
|
||||||
POWERLINE_GIT_INFO_RIGHT="%F{white}"$'\ue0b2'"%F{black}%K{white}"$'$(git_prompt_info)'" %K{white}"
|
|
||||||
fi
|
|
||||||
# fi
|
|
||||||
|
|
||||||
if [ $(id -u) -eq 0 ]; then
|
|
||||||
POWERLINE_SEC1_BG=%K{red}
|
|
||||||
POWERLINE_SEC1_FG=%F{red}
|
|
||||||
else
|
|
||||||
POWERLINE_SEC1_BG=%K{green}
|
|
||||||
POWERLINE_SEC1_FG=%F{green}
|
|
||||||
fi
|
|
||||||
POWERLINE_SEC1_TXT=%F{black}
|
|
||||||
if [ "$POWERLINE_DETECT_SSH" != "" ]; then
|
|
||||||
if [ -n "$SSH_CLIENT" ]; then
|
|
||||||
POWERLINE_SEC1_BG=%K{red}
|
|
||||||
POWERLINE_SEC1_FG=%F{red}
|
|
||||||
POWERLINE_SEC1_TXT=%F{white}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
PROMPT="$POWERLINE_SEC1_BG$POWERLINE_SEC1_TXT $POWERLINE_USER_NAME %k%f$POWERLINE_SEC1_FG%K{blue}"$'\ue0b0'"%k%f%F{white}%K{blue} "$POWERLINE_CURRENT_PATH"%F{blue}"$POWERLINE_GIT_INFO_LEFT" %k"$'\ue0b0'"%f "
|
|
||||||
|
|
||||||
if [ "$POWERLINE_NO_BLANK_LINE" = "" ]; then
|
|
||||||
PROMPT="
|
|
||||||
"$PROMPT
|
|
||||||
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
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user