feat(shell): migrate to fish

This commit is contained in:
2025-12-05 20:29:35 +08:00
parent 837f865b4f
commit ab6dadd113
6 changed files with 169 additions and 96 deletions

View File

@@ -41,6 +41,43 @@ lib.my.makeHomeProgramConfig {
};
};
home.packages = [ pkgs.lazyjj ];
programs.starship = {
settings = {
custom = {
jj = {
ignore_timeout = true;
description = "The current jj status";
when = true;
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"),
)
' || {starship module git_branch && starship module git_status}
'';
};
};
git_state.disabled = true;
git_commit.disabled = true;
git_metrics.disabled = true;
git_branch.disabled = true;
git_status.disabled = true;
};
};
};
};
}