From 2a0f4f6851dcc3bc1279a3091de41ac2951162fd Mon Sep 17 00:00:00 2001 From: Johannes Kresner Date: Wed, 29 Jul 2026 23:54:59 +0200 Subject: [PATCH] feat: improve starship --- config/starship.toml | 68 +++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/config/starship.toml b/config/starship.toml index 0a8539d..7e533b5 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -4,58 +4,50 @@ add_newline = false format = """ -$nix_shell\ $directory\ -${custom.git}\ -${custom.jj}\ -$cmd_duration\ +$git_branch\ +$git_status\ $line_break\ $character""" +right_format = """ +$nix_shell\ +$mise\ +$python\ +$cmd_duration""" + [character] success_symbol = "❯(yellow)" error_symbol = "❯(yellow)" [git_status] -disabled = true +disabled = false [git_branch] -disabled = true - -[custom.git] -when = "jj root >/dev/null 2>&1 && exit 1 || git rev-parse --is-inside-work-tree >/dev/null 2>&1" -command = "starship module git_branch && starship module git_status" -shell = ["sh", "--norc", "--noprofile"] -style = "bold purple" - -[custom.jj] -description = "The current jj status" -when = "jj root >/dev/null 2>&1" +disabled = false symbol = " " -style = "bold blue" -shell = ["sh", "--norc", "--noprofile"] -command = ''' -jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template ' - separate(" ", - change_id.shortest(4), - bookmarks, - "|", - concat( - if(conflict, "💥"), - if(divergent, "🚧"), - if(hidden, "👻"), - if(immutable, "🔒"), - ), - raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"), - raw_escape_sequence("\x1b[1;32m") ++ coalesce( - truncate_end(29, description.first_line(), "…"), - "(no description set)", - ) ++ raw_escape_sequence("\x1b[0m"), - ) -' -''' +style = "bold purple" [directory] truncation_length = 4 style = "bold cyan" +[cmd_duration] +min_time = 2000 +format = "[ $duration]($style)" +style = "bold yellow" + +[nix_shell] +symbol = " " +format = "[$symbol$state( \\($name\\))]($style) " + +[mise] +symbol = " " +format = "[$symbol$env_tools]($style) " + +[python] +symbol = " " +format = "[$symbol$version (\\($virtualenv\\))]($style) " +detect_extensions = [] +detect_files = [] +detect_folders = []