feat: improve starship

This commit is contained in:
johannes committed 2026-07-29 23:54:59 +02:00
1 parent 939ec4fdf6
commit 2a0f4f6851
1 file changed
+30 -38
+30 -38
View File
@@ -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 = []