Last active
December 18, 2020 09:22
-
-
Save GBarthos/b2b3ec40381eec3686974f3e5d7189de to your computer and use it in GitHub Desktop.
ZSH config for "spaceship" theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
################################################################################# | |
### User Custom Config for ZSH theme "spaceship" ### | |
################################################################################# | |
#echo "inside user custom spaceship configs" | |
### | |
# utf8 chars | |
# ✖ ➜ ➤ … ✸ ✦ ⚜ ± ᛜ ᳁ ᳃ • ⃠ ⇆ ⇔ 𐩺 𑀯 | |
### | |
#echo " > sourcing 'sections/line_header.zsh'" | |
#source "$ZSH_CUSTOM/config/spaceship/sections/line_header.zsh" | |
# ------------------------------------------------------------------------------ | |
# Custom Configurations | |
# ------------------------------------------------------------------------------ | |
# customizing vcs formats from zsh | |
if spaceship::defined vcs_info; then | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:*' get-revision true | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:*' stagedstr '✚' | |
zstyle ':vcs_info:*' unstagedstr '●' | |
zstyle ':vcs_info:*' formats '%b %u%c' | |
zstyle ':vcs_info:*' actionformats '%b (%a) %u%c' | |
vcs_info | |
fi | |
# custom spaceship variables | |
SPACESHIP_SEGMENT_SYMBOL=$'\ue0b0' | |
SPACESHIP_HEADER_BG_COLOR="black" | |
SPACESHIP_FG_COLOR_WITH_BG="black" | |
SPACESHIP_DIR_BG_COLOR="blue" | |
SPACESHIP_GIT_BG_COLOR="yellow" | |
SPACESHIP_HG_BG_COLOR="magenta" | |
# ------------------------------------------------------------------------------ | |
# Utils | |
# ------------------------------------------------------------------------------ | |
spaceship::segment() { | |
local 'c1' 'c2' 'content' 'prefix' 'suffix' | |
[[ -n $1 ]] && c1="%F{$1}" || c1="%f" | |
[[ -n $2 ]] && c2="%K{$2}" || c2="%k" | |
[[ -n $3 ]] && prefix="$3" || prefix="" | |
[[ -n $4 ]] && suffix="$4" || suffix="" | |
#content="${prefix}%{%f%b$c2$c1%}${SPACESHIP_SEGMENT_SYMBOL}${suffix}%{%f%k%}" | |
content="%{%f%b$c2$c1%}${SPACESHIP_SEGMENT_SYMBOL}%{%f%k%}" | |
echo -n "$content" | |
} | |
spaceship_header() { | |
spaceship::section "" "" "" "" | |
} | |
spaceship_segment_header_to_dir() { | |
local -r 'content'=$(spaceship::segment "$SPACESHIP_HEADER_BG_COLOR" "$SPACESHIP_DIR_BG_COLOR") | |
# echo "content: '$content'" | |
spaceship::section "" "" "$content" "" | |
} | |
spaceship_segment_dir_to_vcs() { | |
local 'vcs_color' | |
if spaceship::is_git; then | |
vcs_color="$SPACESHIP_GIT_BG_COLOR" | |
elif spaceship::is_hg; then | |
vcs_color="$SPACESHIP_HG_BG_COLOR" | |
else | |
vcs_color="" | |
fi | |
local -r 'content'=$(spaceship::segment "$SPACESHIP_DIR_BG_COLOR" "$vcs_color") | |
spaceship::section "" "" "$content" "" | |
} | |
spaceship_segment_vcs_to_next() { | |
local 'vcs_color' | |
if spaceship::is_git; then | |
vcs_color="$SPACESHIP_GIT_BG_COLOR" | |
elif spaceship::is_hg; then | |
vcs_color="$SPACESHIP_HG_BG_COLOR" | |
else | |
return | |
fi | |
local -r 'content'=$(spaceship::segment "$vcs_color" "" " " "") | |
spaceship::section "" "" "$content" "" | |
} | |
# ------------------------------------------------------------------------------ | |
# Configurations | |
# ------------------------------------------------------------------------------ | |
### PROMPT ##################################################################### | |
# | |
# - | SPACESHIP_PROMPT_ADD_NEWLINE | |
# | true | |
# | Adds a newline character before each prompt line | |
# | |
# - | SPACESHIP_PROMPT_SEPARATE_LINE | |
# | true | |
# | Make the prompt span across two lines | |
# | |
# - | SPACESHIP_PROMPT_FIRST_PREFIX_SHOW | |
# | false | |
# | Shows a prefix of the first section in prompt | |
# | |
# - | SPACESHIP_PROMPT_PREFIXES_SHOW | |
# | true | |
# | Show prefixes before prompt sections or not | |
# | |
# - | SPACESHIP_PROMPT_SUFFIXES_SHOW | |
# | true | |
# | Show suffixes before prompt sections or not | |
# | |
# - | SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | "via" | |
# | Default prefix for prompt sections | |
# | |
# - | SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | "" | |
# | Default suffix for prompt section | |
################################################################################ | |
SPACESHIP_PROMPT_DEFAULT_PREFIX=" " | |
SPACESHIP_PROMPT_DEFAULT_SUFFIX=" " | |
# ------------------------------------------------------------------------------ | |
### CHAR ####################################################################### | |
# | |
# - | SPACESHIP_CHAR_PREFIX | |
# | "" | |
# | Prefix before prompt character | |
# | |
# - | SPACESHIP_CHAR_SUFFIX | |
# | "" | |
# | Suffix after prompt character | |
# | |
# - | SPACESHIP_CHAR_SYMBOL | |
# | "➜" | |
# | Prompt character to be shown before any command | |
# | |
# - | SPACESHIP_CHAR_SYMBOL_ROOT | |
# | $SPACESHIP_CHAR_SYMBOL | |
# | Prompt character to be shown before any command for the root user | |
# | |
# - | SPACESHIP_CHAR_SYMBOL_SECONDARY | |
# | $SPACESHIP_CHAR_SYMBOL | |
# | Secondary prompt character to be shown for incomplete commands | |
# | |
# - | SPACESHIP_CHAR_COLOR_SUCCESS | |
# | "green" | |
# | Color of prompt character if last command completes successfully | |
# | |
# - | SPACESHIP_CHAR_COLOR_FAILURE | |
# | "red" | |
# | Color of prompt character if last command returns non-zero exit-code | |
# | |
# - | SPACESHIP_CHAR_COLOR_SECONDARY | |
# | "yellow" | |
# | Color of secondary prompt character | |
################################################################################ | |
SPACESHIP_CHAR_SUFFIX=" " | |
SPACESHIP_CHAR_SYMBOL="➜" | |
SPACESHIP_CHAR_SYMBOL_ROOT="➤" | |
SPACESHIP_CHAR_COLOR_SECONDARY="white" | |
# ------------------------------------------------------------------------------ | |
### TIME ####################################################################### | |
# | |
# - | SPACESHIP_TIME_SHOW | |
# | false | |
# | Show time (set to true for enabling) | |
# | |
# - | SPACESHIP_TIME_PREFIX | |
# | "at " | |
# | Prefix before time section | |
# | |
# - | SPACESHIP_TIME_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after time section | |
# | |
# - | SPACESHIP_TIME_COLOR | |
# | "yellow" | |
# | Color of time section | |
# | |
# - | SPACESHIP_TIME_FORMAT | |
# | false | |
# | Custom date formatting (ZSH date formats) | |
# | |
# - | SPACESHIP_TIME_12HR | |
# | false | |
# | Format time using 12-hour clock (am/pm) | |
################################################################################ | |
SPACESHIP_TIME_SHOW=true | |
SPACESHIP_TIME_PREFIX="[" | |
SPACESHIP_TIME_SUFFIX="] " | |
SPACESHIP_TIME_COLOR="white" | |
# ------------------------------------------------------------------------------ | |
### USER NAME ################################################################## | |
# | |
# - | SPACESHIP_USER_SHOW | |
# | true | |
# | Show user section (true, false, always or needed) | |
# | |
# - | SPACESHIP_USER_PREFIX | |
# | "with " | |
# | Prefix before user section | |
# | |
# - | SPACESHIP_USER_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after user section | |
# | |
# - | SPACESHIP_USER_COLOR | |
# | "yellow" | |
# | Color of user section | |
# | |
# - | SPACESHIP_USER_COLOR_ROOT | |
# | "red" | |
# | Color of user section when it's root | |
################################################################################ | |
SPACESHIP_USER_PREFIX="%{%K{$SPACESHIP_HEADER_BG_COLOR}%}" | |
SPACESHIP_USER_SUFFIX="%{%k%}" | |
SPACESHIP_USER_COLOR="cyan" | |
SPACESHIP_USER_COLOR_ROOT=166 # flat brownish orange | |
# ------------------------------------------------------------------------------ | |
### HOST NAME ################################################################## | |
# | |
# - | SPACESHIP_HOST_SHOW | |
# | true | |
# | Show host section (true, false or always) | |
# | |
# - | SPACESHIP_HOST_SHOW_FULL | |
# | false | |
# | Show full hostname section (true, false) | |
# | |
# - | SPACESHIP_HOST_PREFIX | |
# | "at " | |
# | Prefix before the connected SSH machine name | |
# | |
# - | SPACESHIP_HOST_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the connected SSH machine name | |
# | |
# - | SPACESHIP_HOST_COLOR | |
# | "blue" | |
# | Color of host section | |
# | |
# - | SPACESHIP_HOST_COLOR_SSH | |
# | "green" | |
# | Color of host in SSH connection | |
################################################################################ | |
SPACESHIP_HOST_PREFIX="%{%K{$SPACESHIP_HEADER_BG_COLOR}%} @ " # -> 'user @ host' | |
SPACESHIP_HOST_SUFFIX="%{%k%}" | |
SPACESHIP_HOST_COLOR=14 # flashy cyan | |
SPACESHIP_HOST_COLOR_SSH=10 # flashy green | |
# ------------------------------------------------------------------------------ | |
### DIRECTORY ################################################################## | |
# | |
# - | SPACESHIP_DIR_SHOW | |
# | true | |
# | Show directory section | |
# | |
# - | SPACESHIP_DIR_PREFIX | |
# | "in " | |
# | Prefix before current directory | |
# | |
# - | SPACESHIP_DIR_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after current directory | |
# | |
# - | SPACESHIP_DIR_TRUNC | |
# | 3 | |
# | Number of folders of cwd to show in prompt, 0 to show all | |
# | |
# - | SPACESHIP_DIR_TRUNC_PREFIX | |
# | "" | |
# | Prefix before cwd when it's truncated. (empty to disable) | |
# | |
# - | SPACESHIP_DIR_TRUNC_REPO | |
# | true | |
# | While in git repo, show only root directory and folders inside it | |
# | |
# - | SPACESHIP_DIR_COLOR | |
# | "cyan" | |
# | Color of directory section | |
# | |
# - | SPACESHIP_DIR_LOCK_SYMBOL | |
# | " " | |
# | The symbol displayed if directory is write-protected | |
# | |
# - | SPACESHIP_DIR_LOCK_COLOR | |
# | "red" | |
# | Color for the lock symbol | |
################################################################################ | |
SPACESHIP_DIR_PREFIX="%{%K{$SPACESHIP_DIR_BG_COLOR}%} " | |
SPACESHIP_DIR_SUFFIX="" | |
SPACESHIP_DIR_TRUNC=0 | |
SPACESHIP_DIR_TRUNC_REPO=true | |
SPACESHIP_DIR_COLOR="$SPACESHIP_FG_COLOR_WITH_BG" | |
SPACESHIP_DIR_TRUNC_PREFIX="…/" | |
# ------------------------------------------------------------------------------ | |
### GIT ######################################################################## | |
# | |
# *|=> GIT <=|* | |
# | |
# - | SPACESHIP_GIT_SHOW | |
# | true | |
# | Show Git section | |
# | |
# - | SPACESHIP_GIT_PREFIX | |
# | "on " | |
# |Prefix before Git section | |
# | |
# - | SPACESHIP_GIT_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Git section | |
# | |
# - | SPACESHIP_GIT_SYMBOL | |
# | "·" | |
# | Character to be shown before Git section (requires powerline patched font) | |
# | |
# *|=> GIT BRANCH <=|* | |
# | |
# - | SPACESHIP_GIT_BRANCH_SHOW | |
# | true | |
# | Show Git branch subsection | |
# | |
# - | SPACESHIP_GIT_BRANCH_PREFIX | |
# | $SPACESHIP_GIT_SYMBOL | |
# | Prefix before Git branch subsection | |
# | |
# - | SPACESHIP_GIT_BRANCH_SUFFIX | |
# | "" | |
# | Suffix after Git branch subsection | |
# | |
# - | SPACESHIP_GIT_BRANCH_COLOR | |
# | "magenta" | |
# | Color of Git branch subsection | |
# | |
# *|=> GIT STATUS <=|* | |
# | |
# - | SPACESHIP_GIT_STATUS_SHOW | |
# | true | |
# | Show Git status subsection | |
# | |
# - | SPACESHIP_GIT_STATUS_PREFIX | |
# | " [" | |
# | Prefix before Git status subsection | |
# | |
# - | SPACESHIP_GIT_STATUS_SUFFIX | |
# | "]" | |
# | Suffix after Git status subsection | |
# | |
# - | SPACESHIP_GIT_STATUS_COLOR | |
# | "red" | |
# | Color of Git status subsection | |
# | |
# - | SPACESHIP_GIT_STATUS_UNTRACKED | |
# | "?" | |
# | Indicator for untracked changes | |
# | |
# - | SPACESHIP_GIT_STATUS_ADDED | |
# | "+" | |
# | Indicator for added changes | |
# | |
# - | SPACESHIP_GIT_STATUS_MODIFIED | |
# | "!" | |
# | Indicator for unstaged files | |
# | |
# - | SPACESHIP_GIT_STATUS_RENAMED | |
# | "»" | |
# | Indicator for renamed files | |
# | |
# - | SPACESHIP_GIT_STATUS_DELETED | |
# | "✘" | |
# | Indicator for deleted files | |
# | |
# - | SPACESHIP_GIT_STATUS_STASHED | |
# | "$" | |
# | Indicator for stashed changes | |
# | |
# - | SPACESHIP_GIT_STATUS_UNMERGED | |
# | "=" | |
# | Indicator for unmerged changes | |
# | |
# - | SPACESHIP_GIT_STATUS_AHEAD | |
# | "⇡" | |
# | Indicator for unpushed changes (ahead of remote branch) | |
# | |
# - | SPACESHIP_GIT_STATUS_BEHIND | |
# | "⇣" | |
# | Indicator for unpulled changes (behind of remote branch) | |
# | |
# - | SPACESHIP_GIT_STATUS_DIVERGED | |
# | "⇕" | |
# | Indicator for diverged changes (diverged with remote branch) | |
################################################################################# | |
SPACESHIP_GIT_PREFIX="%{%K{$SPACESHIP_GIT_BG_COLOR}%} " | |
SPACESHIP_GIT_SUFFIX=" %{%k%f%}" | |
SPACESHIP_GIT_BRANCH_COLOR="$SPACESHIP_FG_COLOR_WITH_BG" | |
SPACESHIP_GIT_STATUS_PREFIX="" | |
SPACESHIP_GIT_STATUS_SUFFIX="" | |
SPACESHIP_GIT_STATUS_COLOR="$SPACESHIP_FG_COLOR_WITH_BG" | |
SPACESHIP_GIT_STATUS_UNTRACKED="⁈" | |
SPACESHIP_GIT_STATUS_ADDED="" | |
SPACESHIP_GIT_STATUS_MODIFIED="" #"±" | |
SPACESHIP_GIT_STATUS_RENAMED="" | |
SPACESHIP_GIT_STATUS_DELETED="" | |
SPACESHIP_GIT_STATUS_STASHED="" | |
SPACESHIP_GIT_STATUS_UNMERGED="" #"⎇" | |
SPACESHIP_GIT_STATUS_DIVERGED="⥮" | |
# ------------------------------------------------------------------------------ | |
### Mercurial ################################################################## | |
# | |
# *|=> HG <=|* | |
# | |
# - | SPACESHIP_HG_SHOW | |
# | true | |
# | Show Mercurial section | |
# | |
# - | SPACESHIP_HG_PREFIX | |
# | "on " | |
# | Prefix before Mercurial section | |
# | |
# - | SPACESHIP_HG_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Mercurial section | |
# | |
# - | SPACESHIP_HG_SYMBOL | |
# | "☿ " | |
# | Character to be shown before Mercurial section | |
# | |
# *|=> HG BRANCH <=|* | |
# | |
# - | SPACESHIP_HG_BRANCH_SHOW | |
# | true | |
# | Show Mercurial branch subsection | |
# | |
# - | SPACESHIP_HG_BRANCH_PREFIX | |
# | $SPACESHIP_HG_SYMBOL | |
# | Prefix before Mercurial branch subsection | |
# | |
# - | SPACESHIP_HG_BRANCH_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Mercurial branch subsection | |
# | |
# - | SPACESHIP_HG_BRANCH_COLOR | |
# | "magenta" | |
# | Color of Mercurial branch subsection | |
# | |
# | |
# *|=> HG STATUS <=|* | |
# | |
# - | SPACESHIP_HG_STATUS_SHOW | |
# | true | |
# | Show Mercurial status subsection | |
# | |
# - | SPACESHIP_HG_STATUS_PREFIX | |
# | "[" | |
# | Prefix before Mercurial status subsection | |
# | |
# - | SPACESHIP_HG_STATUS_SUFFIX | |
# | "]" | |
# | Suffix after Mercurial status subsection | |
# | |
# - | SPACESHIP_HG_STATUS_COLOR | |
# | "red" | |
# | Color of Mercurial status subsection | |
# | |
# - | SPACESHIP_HG_STATUS_UNTRACKED | |
# | "?" | |
# | Indicator for untracked changes | |
# | |
# - | SPACESHIP_HG_STATUS_ADDED | |
# | "+" | |
# | Indicator for added changes | |
# | |
# - | SPACESHIP_HG_STATUS_MODIFIED | |
# | "!" | |
# | Indicator for unstaged files | |
# | |
# - | SPACESHIP_HG_STATUS_DELETED | |
# | "✘" | |
# | Indicator for deleted files | |
################################################################################ | |
SPACESHIP_HG_PREFIX="%{%K{$SPACESHIP_HG_BG_COLOR}%} " | |
SPACESHIP_HG_SUFFIX="" | |
SPACESHIP_HG_BRANCH_COLOR="$SPACESHIP_FG_COLOR_WITH_BG" | |
SPACESHIP_HG_STATUS_PREFIX="" | |
#SPACESHIP_HG_STATUS_SUFFIX="%{%k%F{$SPACESHIP_HG_BG_COLOR}%}$SPACESHIP_SEGMENT_SYMBOL%{%f%}" | |
SPACESHIP_HG_STATUS_SUFFIX="%{%k%f%}" | |
SPACESHIP_HG_STATUS_COLOR="$SPACESHIP_FG_COLOR_WITH_BG" | |
SPACESHIP_HG_STATUS_UNTRACKED="?" | |
SPACESHIP_HG_STATUS_ADDED="+" | |
SPACESHIP_HG_STATUS_MODIFIED="!" | |
SPACESHIP_HG_STATUS_DELETED="" | |
# ------------------------------------------------------------------------------ | |
### PACKAGE #################################################################### | |
# | |
# - | SPACESHIP_PACKAGE_SHOW | |
# | true | |
# | Show package version | |
# | |
# - | SPACESHIP_PACKAGE_PREFIX | |
# | "is " | |
# | Prefix before package version section | |
# | |
# - | SPACESHIP_PACKAGE_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after package version section | |
# | |
# - | SPACESHIP_PACKAGE_SYMBOL | |
# | "📦 " | |
# | Character to be shown before package version | |
# | |
# - | SPACESHIP_PACKAGE_COLOR | |
# | "red" | |
# | Color of package version section | |
################################################################################ | |
SPACESHIP_PACKAGE_COLOR=124 # reddish brick | |
SPACESHIP_PACKAGE_PREFIX=" " | |
# ------------------------------------------------------------------------------ | |
### NODE.JS #################################################################### | |
# | |
# - | SPACESHIP_NODE_SHOW | |
# | true | |
# | Current Node.js section | |
# | |
# - | SPACESHIP_NODE_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Node.js section | |
# | |
# - | SPACESHIP_NODE_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Node.js section | |
# | |
# - | SPACESHIP_NODE_SYMBOL | |
# | "⬢ " | |
# | Character to be shown before Node.js version | |
# | |
# - | SPACESHIP_NODE_DEFAULT_VERSION | |
# | "" | |
# | Node.js version to be treated as default | |
# | |
# - | SPACESHIP_NODE_COLOR | |
# | "green" | |
# | Color of Node.js section | |
################################################################################ | |
SPACESHIP_NODE_PREFIX=" " | |
SPACESHIP_NODE_COLOR=28 # medium green | |
# ------------------------------------------------------------------------------ | |
### RUBY ####################################################################### | |
# | |
# - | SPACESHIP_RUST_SHOW | |
# | true | |
# | Shown current Rust version or not | |
# | |
# - | SPACESHIP_RUST_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Rust section | |
# | |
# - | SPACESHIP_RUST_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Rust section | |
# | |
# - | SPACESHIP_RUST_SYMBOL | |
# | "𝗥 " | |
# | Character to be shown before Rust version | |
# | |
# - | SPACESHIP_RUST_COLOR | |
# | "red" | |
# | Color of Rust section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### ELM ######################################################################## | |
# | |
# - | SPACESHIP_ELM_SHOW | |
# | true | |
# | Show installed Elm version | |
# | |
# - | SPACESHIP_ELM_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Elm section | |
# | |
# - | SPACESHIP_ELM_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Elm section | |
# | |
# - | SPACESHIP_ELM_SYMBOL | |
# | "🌳 " | |
# | Character to be shown before Elm version | |
# | |
# - | SPACESHIP_ELM_COLOR | |
# | "cyan" | |
# | Color of Elm section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### ELIXIR ##################################################################### | |
# | |
# - | SPACESHIP_ELIXIR_SHOW | |
# | true | |
# | Show Elixir section | |
# | |
# - | SPACESHIP_ELIXIR_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Elixir section | |
# | |
# - | SPACESHIP_ELIXIR_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Elixir section | |
# | |
# - | SPACESHIP_ELIXIR_DEFAULT_VERSION | |
# | "" | |
# | Elixir version to be treated as default | |
# | |
# - | SPACESHIP_ELIXIR_SYMBOL | |
# | "💧 " | |
# | Character to be shown before Elixir version | |
# | |
# - | SPACESHIP_ELIXIR_COLOR | |
# | "magenta" | |
# | Color of Elixir section | |
################################################################################ | |
SPACESHIP_ELIXIR_COLOR=53 # purple | |
# ------------------------------------------------------------------------------ | |
### XCODE ###################################################################### | |
# | |
# - | SPACESHIP_XCODE_SHOW_LOCAL | |
# | true | |
# | Current local Xcode version based on [xcenv] | |
# | |
# - | SPACESHIP_XCODE_SHOW_GLOBAL | |
# | true | |
# | Global Xcode version based on [xcenv] | |
# | |
# - | SPACESHIP_XCODE_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Xcode section | |
# | |
# - | SPACESHIP_XCODE_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Xcode section | |
# | |
# - | SPACESHIP_XCODE_SYMBOL | |
# | "🛠 " | |
# | Character to be shown before Xcode version | |
# | |
# - | SPACESHIP_XCODE_COLOR | |
# | "blue" | |
# | Color of Xcode section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### SWIFT ###################################################################### | |
# | |
# - | SPACESHIP_SWIFT_SHOW_LOCAL | |
# | true | |
# | Current local Swift version based on [swiftenv] | |
# | |
# - | SPACESHIP_SWIFT_SHOW_GLOBAL | |
# | false | |
# | Global Swift version based on [swiftenv] | |
# | |
# - | SPACESHIP_SWIFT_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Swift section | |
# | |
# - | SPACESHIP_SWIFT_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix to be shown before the Swift section | |
# | |
# - | SPACESHIP_SWIFT_SYMBOL | |
# | "🐦 " | |
# | Character to be shown before Swift version | |
# | |
# - | SPACESHIP_SWIFT_COLOR | |
# | "yellow" | |
# | Color of Swift section | |
################################################################################ | |
SPACESHIP_SWIFT_COLOR=178 # flat orange | |
# ------------------------------------------------------------------------------ | |
### GOLANG ##################################################################### | |
# | |
# - | SPACESHIP_GOLANG_SHOW | |
# | true | |
# | Shown current Go version or not | |
# | |
# - | SPACESHIP_GOLANG_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Go section | |
# | |
# - | SPACESHIP_GOLANG_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Go section | |
# | |
# - | SPACESHIP_GOLANG_SYMBOL | |
# | "🐹 " | |
# | Character to be shown before Go version | |
# | |
# - | SPACESHIP_GOLANG_COLOR | |
# | "cyan" | |
# | Color of Go section | |
################################################################################ | |
SPACESHIP_GOLANG_COLOR=038 # lightly greenish cyan | |
# ------------------------------------------------------------------------------ | |
### PHP ######################################################################## | |
# | |
# - | SPACESHIP_PHP_SHOW | |
# | true | |
# | Show PHP section | |
# | |
# - | SPACESHIP_PHP_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the PHP section | |
# | |
# - | SPACESHIP_PHP_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the PHP section | |
# | |
# - | SPACESHIP_PHP_SYMBOL | |
# | "🐘 " | |
# | Character to be shown before PHP version | |
# | |
# - | SPACESHIP_PHP_COLOR | |
# | "blue" | |
# | Color of PHP section | |
################################################################################ | |
SPACESHIP_PHP_COLOR=61 # lavender indigo | |
# ------------------------------------------------------------------------------ | |
### RUST ####################################################################### | |
# | |
# - | SPACESHIP_RUST_SHOW | |
# | true | |
# | Shown current Rust version or not | |
# | |
# - | SPACESHIP_RUST_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Rust section | |
# | |
# - | SPACESHIP_RUST_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Rust section | |
# | |
# - | SPACESHIP_PHP_SYMBOL | |
# | "𝗥 " | |
# | Character to be shown before Rust version | |
# | |
# - | SPACESHIP_RUST_COLOR | |
# | "red" | |
# | Color of Rust section | |
################################################################################ | |
SPACESHIP_RUST_COLOR=130 # rusty brownish dark orange | |
# ------------------------------------------------------------------------------ | |
### HASKELL #################################################################### | |
# | |
# - | SPACESHIP_HASKELL_SHOW | |
# | true | |
# | Shown current Haskell Tool Stack version or not | |
# | |
# - | SPACESHIP_HASKELL_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Haskell section | |
# | |
# - | SPACESHIP_HASKELL_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Haskell section | |
# | |
# - | SPACESHIP_HASKELL_SYMBOL | |
# | "λ " | |
# | Character to be shown before Haskell Tool Stack version | |
# | |
# - | SPACESHIP_HASKELL_COLOR | |
# | "red" | |
# | Color of Haskell section | |
################################################################################ | |
SPACESHIP_HASKELL_COLOR=124 # reddish brick | |
# ------------------------------------------------------------------------------ | |
### JULIA ###################################################################### | |
# | |
# - | SPACESHIP_JULIA_SHOW | |
# | true | |
# | Shown current Julia version or not | |
# | |
# - | SPACESHIP_JULIA_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the Julia section | |
# | |
# - | SPACESHIP_JULIA_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Julia section | |
# | |
# - | SPACESHIP_JULIA_SYMBOL | |
# | "ஃ " | |
# | Character to be shown before Julia version | |
# | |
# - | SPACESHIP_JULIA_COLOR | |
# | "green" | |
# | Color of Julia section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### DOCKER ##################################################################### | |
# | |
# - | SPACESHIP_DOCKER_SHOW | |
# | true | |
# | Show current Docker version and connected docker-machine or not | |
# | |
# - | SPACESHIP_DOCKER_PREFIX | |
# | "on" | |
# | Prefix before the Docker section | |
# | |
# - | SPACESHIP_DOCKER_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the Docker section | |
# | |
# - | SPACESHIP_DOCKER_SYMBOL | |
# | "🐳 " | |
# | Character to be shown before Docker version | |
# | |
# - | SPACESHIP_DOCKER_COLOR | |
# | "cyan" | |
# | Color of Docker section | |
# | |
# - | SPACESHIP_DOCKER_VERBOSE | |
# | false | |
# | Show complete Docker version | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### AWS ######################################################################## | |
# | |
# - | SPACESHIP_AWS_SHOW | |
# | true | |
# | Show current selected AWS-cli profile or not | |
# | |
# - | SPACESHIP_AWS_PREFIX | |
# | "using " | |
# | Prefix before the AWS section | |
# | |
# - | SPACESHIP_AWS_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the AWS section | |
# | |
# - | SPACESHIP_AWS_SYMBOL | |
# | "☁️ " | |
# | Character to be shown before AWS profile | |
# | |
# - | SPACESHIP_AWS_COLOR | |
# | 208 | |
# | Color of AWS section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### VIRTUAL ENV ################################################################ | |
# | |
# - | SPACESHIP_VENV_SHOW | |
# | true | |
# | Show current Python virtualenv or not | |
# | |
# - | SPACESHIP_VENV_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the virtualenv section | |
# | |
# - | SPACESHIP_VENV_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the virtualenv section | |
# | |
# - | SPACESHIP_VENV_SYMBOL | |
# | " " | |
# | Character to be shown before virtualenv | |
# | |
# - | SPACESHIP_VENV_GENERIC_NAMES | |
# | (virtualenv venv .venv) | |
# | If the virtualenv folder is in this array, than use its parent directory as its name instead | |
# | |
# - | SPACESHIP_VENV_COLOR | |
# | "blue" | |
# | Color of virtualenv environment section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### CONDA VIRTUAL ENV ########################################################## | |
# | |
# - | SPACESHIP_CONDA_SHOW | |
# | true | |
# | Show current Python conda virtualenv or not | |
# | |
# - | SPACESHIP_CONDA_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the conda virtualenv section | |
# | |
# - | SPACESHIP_CONDA_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the conda virtualenv section | |
# | |
# - | SPACESHIP_CONDA_SYMBOL | |
# | "🅒 " | |
# | Character to be shown before conda virtualenv section | |
# | |
# - | SPACESHIP_CONDA_COLOR | |
# | "blue" | |
# | Color of conda virtualenv environment section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### PY_ENV ##################################################################### | |
# | |
# - | SPACESHIP_PYENV_SHOW | |
# | true | |
# | Show current Pyenv version or not | |
# | |
# - | SPACESHIP_PYENV_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before the pyenv section | |
# | |
# - | SPACESHIP_PYENV_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after the pyenv section | |
# | |
# - | SPACESHIP_PYENV_SYMBOL | |
# | "🐍 " | |
# | Character to be shown before Pyenv version | |
# | |
# - | SPACESHIP_PYENV_COLOR | |
# | "yellow" | |
# | Color of Pyenv section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### .NET ####################################################################### | |
# | |
# - | SPACESHIP_DOTNET_SHOW | |
# | true | |
# | Current .NET section | |
# | |
# - | SPACESHIP_DOTNET_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before .NET section | |
# | |
# - | SPACESHIP_DOTNET_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after .NET section | |
# | |
# - | SPACESHIP_DOTNET_SYMBOL | |
# | ".NET " | |
# | Character to be shown before .NET version | |
# | |
# - | SPACESHIP_DOTNET_COLOR | |
# | 128 | |
# | Color of .NET section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### EMBER.JS ################################################################### | |
# | |
# - | SPACESHIP_EMBER_SHOW | |
# | true | |
# | Current Ember.js section | |
# | |
# - | SPACESHIP_EMBER_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Ember.js section | |
# | |
# - | SPACESHIP_EMBER_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Ember.js section | |
# | |
# - | SPACESHIP_EMBER_SYMBOL | |
# | "🐹 " | |
# | Character to be shown before Ember.js version | |
# | |
# - | SPACESHIP_EMBER_COLOR | |
# | 210 | |
# | Color of Ember.js section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### KUBERNETES CONTEXT ######################################################### | |
# | |
# - | SPACESHIP_KUBECONTEXT_SHOW | |
# | true | |
# | Current Kubectl context section | |
# | |
# - | SPACESHIP_KUBECONTEXT_PREFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_PREFIX | |
# | Prefix before Kubectl context section | |
# | |
# - | SPACESHIP_KUBECONTEXT_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Kubectl context section | |
# | |
# - | SPACESHIP_KUBECONTEXT_SYMBOL | |
# | "☸️ " | |
# | Character to be shown before Kubectl context | |
# | |
# - | SPACESHIP_KUBECONTEXT_COLOR | |
# | "cyan" | |
# | Color of Kubectl context section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### EXECUTION TIME ############################################################# | |
# | |
# - | SPACESHIP_EXEC_TIME_SHOW | |
# | true | |
# | Show execution time | |
# | |
# - | SPACESHIP_EXEC_TIME_PREFIX | |
# | "took " | |
# | Prefix before execution time section | |
# | |
# - | SPACESHIP_EXEC_TIME_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after execution time section | |
# | |
# - | SPACESHIP_EXEC_TIME_COLOR | |
# | "yellow" | |
# | Color of execution time section | |
# | |
# - | SPACESHIP_EXEC_TIME_ELAPSED | |
# | 2 | |
# | The minimum number of seconds for showing execution time section | |
################################################################################ | |
SPACESHIP_EXEC_TIME_SHOW=true | |
SPACESHIP_EXEC_TIME_COLOR=248 # medium grey | |
# ------------------------------------------------------------------------------ | |
### BATTERY #################################################################### | |
# | |
# - | SPACESHIP_BATTERY_SHOW | |
# | true | |
# | Show battery section or not (true, false, always or charged) | |
# | |
# - | SPACESHIP_BATTERY_PREFIX | |
# | "" | |
# | Prefix before battery section | |
# | |
# - | SPACESHIP_BATTERY_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after battery section | |
# | |
# - | SPACESHIP_BATTERY_SYMBOL_CHARGING | |
# | "⇡" | |
# | Character to be shown if battery is charging | |
# | |
# - | SPACESHIP_BATTERY_SYMBOL_DISCHARGING | |
# | "⇣" | |
# | Character to be shown if battery is discharging | |
# | |
# - | SPACESHIP_BATTERY_SYMBOL_FULL | |
# | "•" | |
# | Character to be shown if battery is full | |
# | |
# - | SPACESHIP_BATTERY_THRESHOLD | |
# | 10 | |
# | Battery level below which battery section will be shown | |
################################################################################ | |
SPACESHIP_BATTERY_SHOW=true | |
SPACESHIP_BATTERY_THRESHOLD=25 | |
# ------------------------------------------------------------------------------ | |
### VI MODE #################################################################### | |
# | |
# - | SPACESHIP_VI_MODE_SHOW | |
# | true | |
# | Shown current Vi-mode or not | |
# | |
# - | SPACESHIP_VI_MODE_PREFIX | |
# | "" | |
# | Prefix before Vi-mode section | |
# | |
# - | SPACESHIP_VI_MODE_SUFFIX | |
# | $SPACESHIP_PROMPT_DEFAULT_SUFFIX | |
# | Suffix after Vi-mode section | |
# | |
# - | SPACESHIP_VI_MODE_INSERT | |
# | "[I]" | |
# | Text to be shown when in insert mode | |
# | |
# - | SPACESHIP_VI_MODE_NORMAL | |
# | "[N]" | |
# | Text to be shown when in normal mode | |
# | |
# - | SPACESHIP_VI_MODE_COLOR | |
# | "white" | |
# | Color of Vi-mode section | |
################################################################################ | |
# ------------------------------------------------------------------------------ | |
### JOBS ####################################################################### | |
# | |
# - | SPACESHIP_JOBS_SHOW | |
# | true | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_PREFIX | |
# | "" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_SUFFIX | |
# | "" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_SYMBOL | |
# | "✦" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_COLOR | |
# | "blue" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_AMOUNT_PREFIX | |
# | "" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_AMOUNT_SUFFIX | |
# | "" | |
# | Battery level below which battery section will be shown | |
# | |
# - | SPACESHIP_JOBS_AMOUNT_THRESHOLD | |
# | 1 | |
# | Battery level below which battery section will be shown | |
################################################################################ | |
SPACESHIP_JOBS_SHOW=true | |
SPACESHIP_JOBS_COLOR=69 # lavish indigo | |
SPACESHIP_JOBS_AMOUNT_THRESHOLD=0 | |
# ------------------------------------------------------------------------------ | |
### EXIT CODE ################################################################## | |
# | |
# - | SPACESHIP_EXIT_CODE_SHOW | |
# | false | |
# | Show exit code of last command | |
# | |
# - | SPACESHIP_EXIT_CODE_PREFIX | |
# | "" | |
# | Prefix before exit code section | |
# | |
# - | SPACESHIP_EXIT_CODE_SUFFIX | |
# | "" | |
# | Character to be shown before exit code | |
# | |
# - | SPACESHIP_EXIT_CODE_SYMBOL | |
# | "✘" | |
# | Character to be shown before exit code | |
# | |
# - | SPACESHIP_EXIT_CODE_COLOR | |
# | "red" | |
# | Color of exit code section | |
################################################################################ | |
SPACESHIP_EXIT_CODE_SHOW=true | |
SPACESHIP_EXIT_CODE_SYMBOL="✖ " | |
# ------------------------------------------------------------------------------ | |
# Prompts Sections Configurations | |
# ------------------------------------------------------------------------------ | |
#### PROMPTS ################################################################### | |
# | |
# SPACESHIP_PROMPT_ORDER=( | |
# time user dir host | |
# git hg package | |
# node ruby elm elixir xcode swift golang php rust haskell julia | |
# docker aws venv conda pyenv dotnet ember kubecontext | |
# exec_time line_sep battery vi_mode jobs exit_code char | |
# ) | |
# | |
# SPACESHIP_RPROMPT_ORDER=( | |
# # empty by default | |
# ) | |
# | |
################################################################################ | |
### LEFT PROMPT | |
SPACESHIP_PROMPT_ORDER=( | |
header | |
user # Username section | |
host # Hostname section | |
segment_header_to_dir | |
dir # Current directory section | |
segment_dir_to_vcs | |
git # Git section (git + git_branch + git_status) | |
hg # Mercurial section (hg + hg_branch + hg_status) | |
segment_vcs_to_next | |
docker # Docker section | |
kubectl # Kubectl context section | |
aws # Amazon Web Services section | |
node # Node.js section | |
pyenv # Pyenv section | |
golang # Go section | |
dotnet # .NET section | |
php # PHP section | |
rust # Rust section | |
ruby # Ruby section | |
package # Package version | |
line_sep # Line break | |
time # Time stamps section | |
char # Prompt character | |
) | |
### RIGHT PROMPT | |
SPACESHIP_RPROMPT_ORDER=( | |
exec_time # Execution time | |
battery # Battery level and status | |
jobs # Background jobs indicator | |
exit_code # Exit code section | |
) | |
update:
Changed kubecontext
into kubectl
to follow the theme update
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this file in
$ZSH_CUSTOM/config/spaceship/spaceship.zsh
.Make directory 'config/spaceship' if needed