2024-12-17 12:10:05 +00:00
|
|
|
|
{
|
|
|
|
|
x,
|
|
|
|
|
lib,
|
|
|
|
|
config,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2024-11-21 09:24:15 +00:00
|
|
|
|
with lib;
|
2024-12-09 01:15:55 +00:00
|
|
|
|
with x;
|
2024-12-17 12:10:05 +00:00
|
|
|
|
let
|
|
|
|
|
cfg = config.module.shells.starship;
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
options = {
|
|
|
|
|
module.shells.starship = {
|
|
|
|
|
enable = mkBool;
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-11-21 09:24:15 +00:00
|
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
programs.starship = True // {
|
|
|
|
|
# enableFishIntegration = false;
|
|
|
|
|
enableTransience = true;
|
|
|
|
|
settings = {
|
|
|
|
|
add_newline = true;
|
2024-11-21 10:08:10 +00:00
|
|
|
|
# right_format = lib.concatStrings [ "$cmd_duration" "$line_break" ];
|
2024-11-21 09:24:15 +00:00
|
|
|
|
format = lib.concatStrings [
|
|
|
|
|
"$directory"
|
|
|
|
|
"$git_branch"
|
2024-11-21 10:08:10 +00:00
|
|
|
|
"$git_metrics"
|
2024-11-23 14:31:05 +00:00
|
|
|
|
"$cmd_duration"
|
2024-11-21 09:24:15 +00:00
|
|
|
|
"$line_break"
|
|
|
|
|
"$character"
|
|
|
|
|
];
|
|
|
|
|
directory = {
|
|
|
|
|
format = "[$path]($style) [$read_only]($read_only_style)";
|
|
|
|
|
style = "bold fg:blue";
|
|
|
|
|
read_only = "[] ";
|
|
|
|
|
read_only_style = "bold red";
|
|
|
|
|
home_symbol = "home of [${userName}]";
|
2024-11-27 10:37:54 +00:00
|
|
|
|
truncation_length = 1;
|
2024-11-21 09:24:15 +00:00
|
|
|
|
truncation_symbol = "../";
|
|
|
|
|
};
|
|
|
|
|
git_branch = {
|
|
|
|
|
format = "on [$symbol$branch]($style) ";
|
|
|
|
|
style = "bold italic fg:green";
|
|
|
|
|
symbol = " ";
|
|
|
|
|
truncation_length = 8;
|
|
|
|
|
truncation_symbol = "";
|
|
|
|
|
};
|
2024-11-21 10:08:10 +00:00
|
|
|
|
git_metrics = {
|
|
|
|
|
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
|
|
|
|
|
added_style = "bold fg:green";
|
|
|
|
|
deleted_style = "bold fg:red";
|
|
|
|
|
};
|
2024-11-21 09:24:15 +00:00
|
|
|
|
cmd_duration = {
|
|
|
|
|
min_time = 1000;
|
|
|
|
|
format = "[$duration](bold fg:yellow)";
|
|
|
|
|
};
|
|
|
|
|
character = {
|
|
|
|
|
format = "$symbol ";
|
|
|
|
|
success_symbol = "[❯](bold green)";
|
|
|
|
|
error_symbol = "[✗](bold red)";
|
|
|
|
|
vimcmd_symbol = "[N](bold green)";
|
|
|
|
|
vimcmd_replace_one_symbol = "[R](bold purple)";
|
|
|
|
|
vimcmd_replace_symbol = "[R](bold purple)";
|
|
|
|
|
vimcmd_visual_symbol = "[V](bold yellow)";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|