Switch to starship.rs for prompt

Amolith created

Change summary

dot_config/starship.toml | 40 ++++++++++++++++++++++++++++++++++++++++
private_dot_zshrc.tmpl   | 13 +------------
2 files changed, 41 insertions(+), 12 deletions(-)

Detailed changes

dot_config/starship.toml 🔗

@@ -0,0 +1,40 @@
+add_newline = false
+
+format = """
+[┌─](dimmed) $shlvl$kubernetes$directory$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch$docker_context$package$cmake$dart$elixir$elm$erlang$golang$java$lua$nodejs$perl$php$python$rust$terraform$vagrant$zig$nix_shell$memory_usage$aws$env_var$fill $sudo$username$hostname$cmd_duration$time\
+$line_break\
+[└─](dimmed)$jobs$battery$status$shell$character"""
+
+scan_timeout = 10
+
+[character]
+success_symbol = "[❯](bold green)"
+error_symbol = "[✗](bold red)"
+
+[cmd_duration]
+show_notifications = true
+
+[directory]
+fish_style_pwd_dir_length = 3
+truncate_to_repo = false
+
+[fill]
+symbol = "."
+style = "dimmed"
+
+[git_metrics]
+disabled = false
+
+[golang]
+symbol = "ﳑ "
+
+[hostname]
+trim_at = ""
+format = "on [$hostname]($style) "
+
+[time]
+format = "at [$time](dimmed cyan)"
+disabled = true
+
+[username]
+format = "[$user]($style) "

private_dot_zshrc.tmpl 🔗

@@ -1,12 +1,3 @@
-# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
-# Initialization code that may require console input (password prompts, [y/n]
-# confirmations, etc.) must go above this block; everything else may go below.
-if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
-  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
-fi
-
-source ~/.config/p10k/powerlevel10k.zsh-theme
-
 # Remove older command from the history if a duplicate is to be added.
 setopt HIST_IGNORE_ALL_DUPS
 # Prompt for spelling correction of commands.
@@ -159,6 +150,4 @@ export GPG_TTY="$TTY"
 export SSH_AUTH_SOCK="/run/user/1000/gnupg/S.gpg-agent.ssh"
 gpgconf --launch gpg-agent
 
-# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
-[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
-(( ! ${+functions[p10k]} )) || p10k finalize
+eval "$(starship init zsh)"