1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-08 18:53:53 +00:00
ultima/modules/home/shells/starship.nix

63 lines
1.8 KiB
Nix
Raw Normal View History

2024-11-21 09:24:15 +00:00
{ 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;
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}]";
truncation_length = 2;
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)";
};
};
};
};
}