1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-07 20:43:52 +00:00
ultima/modules/home/shells/starship.nix
2024-11-27 19:37:54 +09:00

63 lines
1.8 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ 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"
"$git_metrics"
"$cmd_duration"
"$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 = 1;
truncation_symbol = "../";
};
git_branch = {
format = "on [$symbol$branch]($style) ";
style = "bold italic fg:green";
symbol = " ";
truncation_length = 8;
truncation_symbol = "";
};
git_metrics = {
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
added_style = "bold fg:green";
deleted_style = "bold fg:red";
};
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)";
};
};
};
};
}