Switch from powerlevel10k to starship
This commit is contained in:
parent
651a2da9be
commit
899c550345
3 changed files with 156 additions and 1601 deletions
155
.config/starship.toml
Normal file
155
.config/starship.toml
Normal file
|
@ -0,0 +1,155 @@
|
||||||
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
|
format = """
|
||||||
|
[╭─](#888888)$os\
|
||||||
|
$username\
|
||||||
|
$hostname\
|
||||||
|
$directory\
|
||||||
|
$git_branch$git_status\
|
||||||
|
$c\
|
||||||
|
$rust\
|
||||||
|
$golang\
|
||||||
|
$nodejs\
|
||||||
|
$php\
|
||||||
|
$java\
|
||||||
|
$kotlin\
|
||||||
|
$haskell\
|
||||||
|
$ruby\
|
||||||
|
$python\
|
||||||
|
[](fg:prev_bg bg:none)\
|
||||||
|
$fill\
|
||||||
|
\
|
||||||
|
$status\
|
||||||
|
$cmd_duration\
|
||||||
|
$time\
|
||||||
|
$all
|
||||||
|
[╰─](#888888) """
|
||||||
|
|
||||||
|
palette = "qvp"
|
||||||
|
|
||||||
|
[palettes.qvp]
|
||||||
|
black = "#000000"
|
||||||
|
white = "#c0c0c0"
|
||||||
|
purple = "#311647"
|
||||||
|
blue = "#3f7fff"
|
||||||
|
yellow = "#f7c61d"
|
||||||
|
red = "#ed008c"
|
||||||
|
|
||||||
|
[os]
|
||||||
|
style = "bold fg:black bg:white"
|
||||||
|
format = "[](fg:prev_bg bg:white)[$symbol ]($style)"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[os.symbols]
|
||||||
|
Windows = ""
|
||||||
|
Ubuntu = ""
|
||||||
|
SUSE = ""
|
||||||
|
Raspbian = ""
|
||||||
|
Mint = ""
|
||||||
|
Macos = ""
|
||||||
|
Manjaro = ""
|
||||||
|
Linux = ""
|
||||||
|
Gentoo = ""
|
||||||
|
Fedora = ""
|
||||||
|
Alpine = ""
|
||||||
|
Amazon = ""
|
||||||
|
Android = ""
|
||||||
|
Arch = ""
|
||||||
|
Artix = ""
|
||||||
|
EndeavourOS = ""
|
||||||
|
CentOS = ""
|
||||||
|
Debian = ""
|
||||||
|
Redhat = ""
|
||||||
|
RedHatEnterprise = ""
|
||||||
|
|
||||||
|
[username]
|
||||||
|
format = "[](fg:prev_bg bg:black)[ with $user]($style)"
|
||||||
|
style_user = "fg:yellow bg:black"
|
||||||
|
style_root = "fg:red bg:black"
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
format = "[@$hostname ]($style)"
|
||||||
|
style = "fg:prev_fg bg:prev_bg"
|
||||||
|
ssh_only = true
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
format = "[](fg:prev_bg bg:blue)[ $path]($style)[$read_only ]($read_only_style)"
|
||||||
|
style = "bold fg:black bg:blue"
|
||||||
|
read_only_style = "bold fg:black bg:blue"
|
||||||
|
truncation_length = 3
|
||||||
|
truncation_symbol = "…/"
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
format = "[](fg:prev_bg bg:yellow)[ $symbol$branch(:$remote_branch) ]($style)"
|
||||||
|
style = "bg:yellow fg:black"
|
||||||
|
symbol = ""
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
format = '([\[$all_status$ahead_behind\] ]($style))'
|
||||||
|
style = "bg:yellow fg:black"
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol$version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[c]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol$version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[php]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[java]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[kotlin]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[haskell]
|
||||||
|
format = "[](fg:prev_bg bg:purple)[ $symbol $version ]($style)"
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[ruby]
|
||||||
|
format = '[](fg:prev_bg bg:purple)[ ${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[python]
|
||||||
|
format = '[](fg:prev_bg bg:purple)[ ${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||||
|
style = "fg:white bg:purple"
|
||||||
|
|
||||||
|
[time]
|
||||||
|
format = "[](fg:white bg:prev_bg)[ $time ]($style)"
|
||||||
|
style = "fg:black bg:white"
|
||||||
|
disabled = false
|
||||||
|
time_format = "%T"
|
||||||
|
|
||||||
|
[line_break]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[character]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[status]
|
||||||
|
format = '[](fg:red bg:last_bg)[ $int $symbol ]($style)'
|
||||||
|
style = "fg:yellow bg:red"
|
||||||
|
pipestatus_format = '[](fg:red bg:last_bg)[ $pipestatus $symbol ]($style)'
|
||||||
|
pipestatus_segment_format = "$int"
|
||||||
|
symbol = '[✘](bold fg:yellow bg:red)'
|
||||||
|
map_symbol = true
|
||||||
|
pipestatus = true
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
format = "[](fg:yellow bg:prev_bg)[ took $duration ]($style)"
|
||||||
|
style = "fg:black bg:yellow"
|
10
.zshrc
10
.zshrc
|
@ -1,10 +1,3 @@
|
||||||
# Archlinux packages p10k but nothing else does, so we have to check where p10k is
|
|
||||||
if [[ -a /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme ]]; then
|
|
||||||
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
|
|
||||||
else
|
|
||||||
source ~/.p10k/powerlevel10k.zsh-theme
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Print user@host into title so terminal tabs are correct
|
# Print user@host into title so terminal tabs are correct
|
||||||
# Despite being called precmd() this executes after process exits, before prompt
|
# Despite being called precmd() this executes after process exits, before prompt
|
||||||
precmd() { echo -ne "\033]0;${USER}@${HOST}\007" }
|
precmd() { echo -ne "\033]0;${USER}@${HOST}\007" }
|
||||||
|
@ -39,5 +32,4 @@ bindkey '^x^e' edit-command-line
|
||||||
# Load any kind of system-local stuff
|
# Load any kind of system-local stuff
|
||||||
[[ ! -f ~/.zshrc.local ]] || source ~/.zshrc.local
|
[[ ! -f ~/.zshrc.local ]] || source ~/.zshrc.local
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
eval "$(starship init zsh)"
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue