zsh: spaceship-prompt -> starship for zsh
This commit is contained in:
parent
bc8b89dd80
commit
fd293d5641
@ -1,14 +1,96 @@
|
|||||||
|
format = """
|
||||||
|
$all\
|
||||||
|
$line_break\
|
||||||
|
$time\
|
||||||
|
$status\
|
||||||
|
$character
|
||||||
|
"""
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "[➜](bold green)"
|
success_symbol = " [➜](bold green)"
|
||||||
error_symbol = "[✘](bold #ee4e4e)"
|
error_symbol = " [🔥](bold #ee4e4e)"
|
||||||
|
|
||||||
|
[battery]
|
||||||
|
full_symbol = "•"
|
||||||
|
charging_symbol = "⇡"
|
||||||
|
discharging_symbol = "⇣"
|
||||||
|
unknown_symbol = "~"
|
||||||
|
|
||||||
|
[[battery.display]]
|
||||||
|
threshold = 35
|
||||||
|
|
||||||
|
[cmake]
|
||||||
|
format = " [$symbol($version )]($style)"
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
# notification support via
|
||||||
|
# cargo install starship --features=notify-rust
|
||||||
|
show_notifications = true
|
||||||
|
# in milliseconds
|
||||||
|
min_time_to_notify = 10_000
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
truncate_to_repo = true
|
||||||
|
style = "bold blue"
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
format = "[$symbol$branch]($style) "
|
||||||
|
style = "bright-black"
|
||||||
|
|
||||||
|
# [git_commit]
|
||||||
|
# only_detached = false
|
||||||
|
|
||||||
|
[git_metrics]
|
||||||
|
disabled = false
|
||||||
|
added_style = "bold blue"
|
||||||
|
|
||||||
[git_status]
|
[git_status]
|
||||||
ahead = "⇡${count}"
|
ahead = "⇡${count}"
|
||||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
||||||
behind = "⇣${count}"
|
behind = "⇣${count}"
|
||||||
|
deleted = "[•](bold red)"
|
||||||
|
untracked = "[⚶](bold cyan) "
|
||||||
|
stashed = "[≡](bold yellow)"
|
||||||
|
staged = "[+](bold green)"
|
||||||
|
modified = "[∆](bold green)"
|
||||||
|
renamed = "[⥁](bold magenta]"
|
||||||
|
conflicted = "[⥯](bold red)"
|
||||||
|
format = "[$conflicted$stashed$modified$staged$renamed$deleted$untracked$ahead_behind]($style)"
|
||||||
|
|
||||||
[python]
|
[golang]
|
||||||
disabled = false
|
format = "[$symbol($version )]($style)"
|
||||||
|
|
||||||
|
[kotlin]
|
||||||
|
format = "[$symbol($version )]($style)"
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
format = "[$symbol($version )]($style)"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
disabled = true
|
disabled = true
|
||||||
|
|
||||||
|
[python]
|
||||||
|
# don't trigger just when a ".py" is found
|
||||||
|
detect_extensions = []
|
||||||
|
style = "bright-black"
|
||||||
|
format = "[${symbol}${pyenv_prefix}(${version} )$virtualenv ]($style)"
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
format = "[$symbol($version )]($style)"
|
||||||
|
|
||||||
|
[status]
|
||||||
|
disabled = false
|
||||||
|
style = "red"
|
||||||
|
symbol = "\\(╯°□°)╯︵ ┻━┻ "
|
||||||
|
format = " \b(bg:$style fg:#4169e1)[$symbol$status](bg:$style)(fg:$style)"
|
||||||
|
# ref:
|
||||||
|
# https://github.com/starship/starship/discussions/1107#discussioncomment-345147
|
||||||
|
|
||||||
|
[time]
|
||||||
|
# Enable and format the time module
|
||||||
|
disabled = false
|
||||||
|
style = "bold bright-black"
|
||||||
|
format = "[$time]($style)"
|
||||||
|
26
.zshrc
26
.zshrc
@ -5,7 +5,6 @@
|
|||||||
ZSH_CACHE_DIR="$ZSH/cache"
|
ZSH_CACHE_DIR="$ZSH/cache"
|
||||||
|
|
||||||
source ~/.zplug/init.zsh
|
source ~/.zplug/init.zsh
|
||||||
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
|
|
||||||
zplug "zsh-users/zsh-autosuggestions", defer:2
|
zplug "zsh-users/zsh-autosuggestions", defer:2
|
||||||
zplug "zsh-users/zsh-history-substring-search", defer:2
|
zplug "zsh-users/zsh-history-substring-search", defer:2
|
||||||
zplug "plugins/git", from:oh-my-zsh, defer:2
|
zplug "plugins/git", from:oh-my-zsh, defer:2
|
||||||
@ -25,30 +24,6 @@
|
|||||||
fi
|
fi
|
||||||
zplug load
|
zplug load
|
||||||
|
|
||||||
ZSH_THEME="spaceship"
|
|
||||||
SPACESHIP_PROMPT_ORDER=(time user dir host git hg package node ruby golang rust docker pyenv dotnet exec_time line_sep battery jobs exit_code char)
|
|
||||||
SPACESHIP_PROMPT_ADD_NEWLINE=false
|
|
||||||
SPACESHIP_PROMPT_SEPARATE_LINE=true
|
|
||||||
|
|
||||||
SPACESHIP_TIME_SHOW=true
|
|
||||||
SPACESHIP_TIME_COLOR=white
|
|
||||||
SPACESHIP_DIR_PREFIX="%F{green}▲ "
|
|
||||||
SPACESHIP_DIR_COLOR=blue
|
|
||||||
#SPACESHIP_DIR_TRUNC=3
|
|
||||||
SPACESHIP_DIR_TRUNC_REPO=false
|
|
||||||
SPACESHIP_HOST_SHOW=true
|
|
||||||
SPACESHIP_HOST_PREFIX="@"
|
|
||||||
SPACESHIP_HOST_COLOR=green
|
|
||||||
SPACESHIP_GIT_STATUS_PREFIX=" "
|
|
||||||
SPACESHIP_GIT_STATUS_SUFFIX=""
|
|
||||||
SPACESHIP_GIT_STATUS_ADDED="%F{green}•%F{red}" # +
|
|
||||||
SPACESHIP_GIT_STATUS_UNTRACKED="%F{blue}•%F{red}" # ?
|
|
||||||
SPACESHIP_GIT_STATUS_DELETED="%F{red}•%F{red}" # x
|
|
||||||
SPACESHIP_GIT_STATUS_MODIFIED="%F{yellow}•%F{green}" # !
|
|
||||||
SPACESHIP_BATTERY_SHOW=true
|
|
||||||
SPACESHIP_BATTERY_THRESHOLD=35
|
|
||||||
SPACESHIP_CHAR_COLOR_SUCCESS=green
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
# CASE_SENSITIVE="true"
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
@ -203,3 +178,4 @@
|
|||||||
echo $FILE_URL
|
echo $FILE_URL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
Loading…
Reference in New Issue
Block a user