From a7293ebcdd6eae9433c0bddf29947e5e37123775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kuhlmann?= Date: Mon, 26 Jun 2017 01:17:47 +0200 Subject: [PATCH 1/4] Add screen prompt Add a new bullet showing the current screen session. GNU Screen is a easy to use window manager. For more information visit: http://www.gnu.org/software/screen/ --- bullet-train.zsh-theme | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index b7c7c9a..9302f8f 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -23,6 +23,7 @@ if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then custom context dir + screen perl ruby virtualenv @@ -275,6 +276,17 @@ else ZSH_THEME_GIT_PROMPT_DIVERGED=$BULLETTRAIN_GIT_PROMPT_DIVERGED 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 if [ ! -n "${BULLETTRAIN_EXEC_TIME_ELAPSED+1}" ]; then BULLETTRAIN_EXEC_TIME_ELAPSED=5 @@ -538,6 +550,14 @@ prompt_aws() { 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() { if [[ $BULLETTRAIN_TIME_12HR == true ]]; then prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r} From 180e9642b7cb52c8e0679751b7a675c156351e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kuhlmann?= Date: Mon, 26 Jun 2017 01:19:00 +0200 Subject: [PATCH 2/4] Add screen information to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 20caaeb..7523759 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,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. +### 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 |Variable|Default|Meaning From 42b5dd706bed6ff024a6becda5859e509d03e17d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kuhlmann?= Date: Sun, 10 Sep 2017 12:40:01 +0200 Subject: [PATCH 3/4] Change prefix icon --- bullet-train.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index 9302f8f..671c183 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -284,7 +284,7 @@ if [ ! -n "${BULLETTRAIN_SCREEN_FG+1}" ]; then BULLETTRAIN_SCREEN_FG=black fi if [ ! -n "${BULLETTRAIN_SCREEN_PREFIX+1}" ]; then - BULLETTRAIN_SCREEN_PREFIX="⚙" + BULLETTRAIN_SCREEN_PREFIX="⬗" fi # COMMAND EXECUTION TIME From c0e75b3a371832e345e2dfdec31a66738f3bd271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Kuhlmann?= Date: Tue, 10 Oct 2017 16:37:31 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7523759..875c5a7 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,7 @@ The git prompt can be disabled for a specific repository by setting a git config |--------|-------|-------| |`BULLETTRAIN_SCREEN_BG`|`white`|Background color |`BULLETTRAIN_SCREEN_FG`|`black`|Foreground color -|`BULLETTRAIN_SCREEN_PREFIX`|`⚙`|Prefix of the segment +|`BULLETTRAIN_SCREEN_PREFIX`|`⬗`|Prefix of the segment ### Mercurial/HG