aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--README.md1
-rw-r--r--functions/icons.zsh3
-rwxr-xr-xpowerlevel9k.zsh-theme15
4 files changed, 21 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 557f977b..218e1d76 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,11 @@ POWERLEVEL9K_VCS_CLEAN_FOREGROUND='cyan'
POWERLEVEL9K_VCS_CLEAN_BACKGROUND='white'
```
+The foreground color of actionformat is now configurable via:
+```zsh
+POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND='green'
+```
+
### `aws_eb_env` added
This segment displays the current Elastic Beanstalk environment.
diff --git a/README.md b/README.md
index 43170580..9e9ff64c 100644
--- a/README.md
+++ b/README.md
@@ -126,6 +126,7 @@ The segments that are currently available are:
* **AWS Segments:**
* [`aws`](#aws) - The current AWS profile, if active.
* `aws_eb_env` - The current Elastic Beanstalk Environment.
+* `docker_machine` - The current Docker Machine.
**Other:**
* [`custom_command`](#custom_command) - Create a custom segment to display the
diff --git a/functions/icons.zsh b/functions/icons.zsh
index e7dc3bfa..e40d6060 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -51,6 +51,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON $'\UE190 ' # 
SWAP_ICON $'\UE87D' # 
RAM_ICON $'\UE1E2 ' # 
+ SERVER_ICON $'\UE895' # 
VCS_UNTRACKED_ICON $'\UE16C' # 
VCS_UNSTAGED_ICON $'\UE17C' # 
VCS_STAGED_ICON $'\UE168' # 
@@ -105,6 +106,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON $'\UF080 ' # 
SWAP_ICON $'\UF0E4' # 
RAM_ICON $'\UF0E4' # 
+ SERVER_ICON $'\UF296' # 
VCS_UNTRACKED_ICON $'\UF059' # 
VCS_UNSTAGED_ICON $'\UF06A' # 
VCS_STAGED_ICON $'\UF055' # 
@@ -155,6 +157,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON 'L'
SWAP_ICON 'SWP'
RAM_ICON 'RAM'
+ SERVER_ICON ''
VCS_UNTRACKED_ICON '?'
VCS_UNSTAGED_ICON $'\u25CF' # ●
VCS_STAGED_ICON $'\u271A' # ✚
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 67406aca..7da17f99 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -499,6 +499,15 @@ prompt_dir() {
fi
}
+# Docker machine
+prompt_docker_machine() {
+ local docker_machine="$DOCKER_MACHINE_NAME"
+
+ if [[ -n "$docker_machine" ]]; then
+ "$1_prompt_segment" "$0" "$2" "magenta" "$DEFAULT_COLOR" "$docker_machine" 'SERVER_ICON'
+ fi
+}
+
# GO prompt
prompt_go_version() {
local go_version
@@ -596,8 +605,8 @@ prompt_node_version() {
prompt_nvm() {
[[ ! $(type nvm) =~ 'nvm is a shell function'* ]] && return
local node_version=$(nvm current)
+ [[ -z "${node_version}" ]] || [[ ${node_version} = "none" ]] && return
local nvm_default=$(cat $NVM_DIR/alias/default)
- [[ -z "${node_version}" ]] && return
[[ "$node_version" =~ "$nvm_default" ]] && return
$1_prompt_segment "$0" "$2" "green" "011" "${node_version:1}" 'NODE_ICON'
@@ -805,6 +814,7 @@ prompt_todo() {
# VCS segment: shows the state of your repository, if you are in a folder under
# version control
+set_default POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND "red"
prompt_vcs() {
autoload -Uz vcs_info
@@ -818,7 +828,6 @@ prompt_vcs() {
'clean' 'green'
'modified' 'yellow'
'untracked' 'green'
- 'actionformat' 'red'
)
VCS_CHANGESET_PREFIX=''
@@ -838,7 +847,7 @@ prompt_vcs() {
VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%b%c%u%m"
zstyle ':vcs_info:*' formats "$VCS_DEFAULT_FORMAT"
- zstyle ':vcs_info:*' actionformats "%b %F{${vcs_states[actionformat]}}| %a%f"
+ zstyle ':vcs_info:*' actionformats "%b %F{${POWERLEVEL9K_VCS_ACTIONFORMAT_FOREGROUND}}| %a%f"
zstyle ':vcs_info:*' stagedstr " $(print_icon 'VCS_STAGED_ICON')"
zstyle ':vcs_info:*' unstagedstr " $(print_icon 'VCS_UNSTAGED_ICON')"