feat(shell): switch to starship because it's fast

This commit is contained in:
2023-09-08 00:43:37 +03:00
parent acae4fec73
commit bc608cd578
5 changed files with 147 additions and 1722 deletions

View File

@@ -68,8 +68,6 @@ have antigen && {
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
&& source "${DOTFILES}/config/fzf/fzf.zsh"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# shellcheck source=config/zsh/p10k.zsh
export P10K_LOCATION="$XDG_CONFIG_HOME/zsh/p10k.zsh"
[[ ! -f $P10K_LOCATION ]] || source "$P10K_LOCATION"
# Start starship
eval "$(starship init zsh)"

View File

@@ -83,12 +83,9 @@ x-default-antigen-bundles()
# these should be available if there's need
have brew && antigen bundle brew
have nvm && antigen bundle nvm
# have nvm && antigen bundle nvm
have nvm && antigen bundle "$DOTFILES/config/zsh/plugins/nvm-auto-use"
have php && antigen bundle php
have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
have rvm && antigen bundle unixorn/rvm-plugin
# the theme to use
antigen theme romkatv/powerlevel10k
}

143
config/starship.toml Normal file
View File

@@ -0,0 +1,143 @@
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
format = """
$os\
$directory\
$git_branch\
$git_state\
$git_status\
$fill\
$battery\
$username\
$hostname\
$aws\
$gcloud\
$conda\
$golang\
$nodejs\
$php\
$python\
$package\
$line_break\
$character"""
# Timeout for commands executed by starship (in milliseconds).
# command_timeout = 1000
[character]
success_symbol = "[→](bold green)"
error_symbol = "[→](red)"
vimcmd_symbol = "[←](green)"
[aws]
symbol = " "
format = '[$symbol($profile )(\($region\) )(\[$duration\] )]($style)'
[cmd_duration]
disabled = true
[directory]
read_only = " 󰌾"
style = "blue"
[docker_context]
symbol = " "
[fill]
symbol = '·'
style = 'bold black'
[gcloud]
format = ' [($symbol)$account(@$domain)(\($region\))]($style) '
[git_branch]
symbol = " "
truncation_length = 20
truncation_symbol = '…'
ignore_branches = ['master', 'main']
[git_status]
up_to_date = '✓'
staged = '[++\($count\)](green)'
[git_state]
format = '\([$state( $progress_current/$progress_total)]($style)\) '
style = "bright-black"
[git_metrics]
added_style = 'bold blue'
format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
disabled = false
[golang]
symbol = " "
[hostname]
ssh_symbol = " "
[nodejs]
symbol = " "
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[os]
format = "[$symbol]($style) "
style = "bold blue"
disabled = false
[os.symbols]
Alpaquita = " "
Alpine = " "
Amazon = " "
Android = " "
Arch = " "
Artix = " "
CentOS = " "
Debian = " "
DragonFly = " "
Emscripten = " "
EndeavourOS = " "
Fedora = " "
FreeBSD = " "
Garuda = "󰛓 "
Gentoo = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Linux = " "
Mabox = " "
Macos = " "
Manjaro = " "
Mariner = " "
MidnightBSD = " "
Mint = " "
NetBSD = " "
NixOS = " "
OpenBSD = "󰈺 "
openSUSE = " "
OracleLinux = "󰌷 "
Pop = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = " "
Ubuntu = " "
Unknown = " "
Windows = "󰍲 "
[package]
symbol = "󰏗 "
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[php]
format = '[$symbol($version )]($style)'
version_format = '${major}.${minor}'
[python]
symbol = " "
format = "[$virtualenv]($style) "
style = "bright-black"

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
SCRIPT=$(basename "$0")
VERSION_NVM="v0.39.3"
VERSION_NVM="v0.39.5"
# shellcheck source=./../../scripts/shared.sh
source "$SHARED_SCRIPT"