Merge pull request #227 from KuhlTime/master

Add GNU Screen bullet
This commit is contained in:
Viktor (Icon) VAD
2017-10-10 15:38:40 +01:00
committed by GitHub
2 changed files with 28 additions and 0 deletions

View File

@@ -241,6 +241,14 @@ This environment var is used by aws-cli and other tools to use the right access
The git prompt can be disabled for a specific repository by setting a git config flag: `get config oh-my-zsh.hide-status 1`. This is useful to avoid performance issues for particularly huge repositories. The git prompt can be disabled for a specific repository by setting a git config flag: `get config oh-my-zsh.hide-status 1`. This is useful to avoid performance issues for particularly huge repositories.
### Screen
|Variable|Default|Meaning
|--------|-------|-------|
|`BULLETTRAIN_SCREEN_BG`|`white`|Background color
|`BULLETTRAIN_SCREEN_FG`|`black`|Foreground color
|`BULLETTRAIN_SCREEN_PREFIX`|`⬗`|Prefix of the segment
### Mercurial/HG ### Mercurial/HG
|Variable|Default|Meaning |Variable|Default|Meaning

View File

@@ -23,6 +23,7 @@ if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
custom custom
context context
dir dir
screen
perl perl
ruby ruby
virtualenv virtualenv
@@ -275,6 +276,17 @@ else
ZSH_THEME_GIT_PROMPT_DIVERGED=$BULLETTRAIN_GIT_PROMPT_DIVERGED ZSH_THEME_GIT_PROMPT_DIVERGED=$BULLETTRAIN_GIT_PROMPT_DIVERGED
fi fi
# SCREEN
if [ ! -n "${BULLETTRAIN_SCREEN_BG+1}" ]; then
BULLETTRAIN_SCREEN_BG=white
fi
if [ ! -n "${BULLETTRAIN_SCREEN_FG+1}" ]; then
BULLETTRAIN_SCREEN_FG=black
fi
if [ ! -n "${BULLETTRAIN_SCREEN_PREFIX+1}" ]; then
BULLETTRAIN_SCREEN_PREFIX="⬗"
fi
# COMMAND EXECUTION TIME # COMMAND EXECUTION TIME
if [ ! -n "${BULLETTRAIN_EXEC_TIME_ELAPSED+1}" ]; then if [ ! -n "${BULLETTRAIN_EXEC_TIME_ELAPSED+1}" ]; then
BULLETTRAIN_EXEC_TIME_ELAPSED=5 BULLETTRAIN_EXEC_TIME_ELAPSED=5
@@ -540,6 +552,14 @@ prompt_aws() {
fi fi
} }
# SCREEN Session
prompt_screen() {
local session_name="$STY"
if [[ "$session_name" != "" ]]; then
prompt_segment $BULLETTRAIN_SCREEN_BG $BULLETTRAIN_SCREEN_FG $BULLETTRAIN_SCREEN_PREFIX" $session_name"
fi
}
prompt_time() { prompt_time() {
if [[ $BULLETTRAIN_TIME_12HR == true ]]; then if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r} prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}