Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
This commit is contained in:
2025-11-12 07:41:04 +00:00
parent 15d994fac2
commit d5aca63129

View File

@@ -1,59 +1,45 @@
{ {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
add_newline = true; add_newline = true;
command_timeout = 200; command_timeout = 200;
format = "$directory$git_branch$git_commit$git_status$git_state$git_metrics\n$character"; format = "[$directory$\{custom.jj}]($style)$character";
character = { character = {
error_symbol = "[ ](bold #d20f39)"; error_symbol = "[ ](bold #e64553)";
success_symbol = "[](bold #40a02b)[](bold #df8e1d)[](bold #179299)"; success_symbol = "[](bold #40a02b)[](bold #df8e1d)[](bold #dc8a78)";
}; };
directory = { directory = {
truncation_length = 2; truncation_length = 2;
truncation_symbol = "/"; truncation_symbol = "/";
repo_root_style = "bold cyan"; repo_root_style = "bold cyan";
repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "; repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) ";
}; };
git_branch = { custom.jj = {
format = " @[$branch(:$remote_branch)]($style)"; command = ''
symbol = ""; jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '
style = "bold #40a02b"; separate(" ",
truncation_length = 28; change_id.shortest(4),
}; bookmarks,
git_commit = { "|",
commit_hash_length = 4; concat(
only_detached = false; if(conflict, "💥"),
tag_disabled = true; if(divergent, "🚧"),
format = " [$hash]($style)"; if(hidden, "👻"),
style = "bold #1e66f5"; if(immutable, "🔒"),
}; ),
git_status = { raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"),
format = " [$ahead_behind$staged$modified$renamed$deleted$typechanged$untracked$stashed$conflicted]($style)"; raw_escape_sequence("\x1b[1;32m") ++ coalesce(
style = "bold #df8e1d"; truncate_end(29, description.first_line(), ""),
ahead = " a+$count"; "(no description set)",
behind = " b+$count"; ) ++ raw_escape_sequence("\x1b[0m"),
diverged = " div:$ahead_count/$behind_count"; )
staged = " s:$count"; '
modified = " m:$count"; '';
renamed = " r:$count"; when = "jj --ignore-working-copy root";
deleted = " d:$count"; symbol = "🥋";
typechanged = " t:$count"; };
untracked = " u:$count"; };
stashed = " st:$count"; };
conflicted = " x:$count";
};
git_state = {
format = " {$state($progress_current/$progress_total)}($style)";
style = "bold #d20f39";
};
git_metrics = {
disabled = false;
format = " [+$added]($added_style)/[-$deleted]($deleted_style)";
added_style = "bold #40a02b";
deleted_style = "bold #d20f39";
};
};
};
} }