mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-08 18:53:53 +00:00
56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
|
{ lib, config, userName, True, ... }:
|
|||
|
|
|||
|
with lib;
|
|||
|
|
|||
|
let cfg = config.module.shells.starship;
|
|||
|
in {
|
|||
|
options = { module.shells.starship = { enable = mkEnableOption ""; }; };
|
|||
|
|
|||
|
config = mkIf cfg.enable {
|
|||
|
programs.starship = True // {
|
|||
|
# enableFishIntegration = false;
|
|||
|
enableTransience = true;
|
|||
|
settings = {
|
|||
|
add_newline = true;
|
|||
|
right_format = lib.concatStrings [ "$cmd_duration" "$line_break" ];
|
|||
|
format = lib.concatStrings [
|
|||
|
"$directory"
|
|||
|
"$git_branch"
|
|||
|
"$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}]";
|
|||
|
truncation_length = 2;
|
|||
|
truncation_symbol = "../";
|
|||
|
};
|
|||
|
git_branch = {
|
|||
|
format = "on [$symbol$branch]($style) ";
|
|||
|
style = "bold italic fg:green";
|
|||
|
symbol = " ";
|
|||
|
truncation_length = 8;
|
|||
|
truncation_symbol = "";
|
|||
|
};
|
|||
|
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)";
|
|||
|
};
|
|||
|
};
|
|||
|
};
|
|||
|
};
|
|||
|
}
|
|||
|
|