dotfiles/home/modules/starship/config/settings.nix

89 lines
2.2 KiB
Nix
Raw Normal View History

2024-11-20 17:47:07 -06:00
{
2024-12-19 19:56:45 -06:00
flake,
lib,
...
}: let
2025-01-08 19:06:14 -06:00
inherit
2025-01-14 16:17:42 -06:00
(flake.config.aesthetics.themes.schemes.catppuccin-macchiato)
colours
2025-01-08 19:06:14 -06:00
;
makeColor = c:
"#"
+ c;
makeStyle = bg: fg:
"bg:"
+ bg
+ " fg:"
+ fg
+ " bold";
surround = fg: text:
"[](fg:"
2025-01-14 16:17:42 -06:00
+ makeColor colours.base
2025-01-08 19:06:14 -06:00
+ " bg:"
+ fg
+ ")"
+ "[](fg:"
+ fg
+ ")"
+ text
+ "[](fg:"
+ fg
+ ")";
2024-12-19 19:56:45 -06:00
in {
2025-01-08 01:05:45 -06:00
add_newline = false;
character = let
2025-01-08 19:11:58 -06:00
makeChar = bg: c:
surround (makeColor bg) ("["
+ c
+ "]("
2025-01-14 16:17:42 -06:00
+ makeStyle (makeColor bg) (makeColor colours.crust)
2025-01-08 19:11:58 -06:00
+ ")");
2025-01-08 01:05:45 -06:00
in {
2025-01-14 16:17:42 -06:00
error_symbol = makeChar colours.maroon "";
2025-01-08 01:05:45 -06:00
format = "$symbol";
2025-01-14 16:17:42 -06:00
success_symbol = makeChar colours.teal "λ";
2024-11-20 17:47:07 -06:00
};
2025-01-08 01:05:45 -06:00
cmd_duration = {
2025-01-14 16:17:42 -06:00
format = surround (makeColor colours.mauve) "[ $duration]($style)";
2025-01-08 01:05:45 -06:00
min_time = 0;
show_milliseconds = true;
2025-01-14 16:17:42 -06:00
style = makeStyle (makeColor colours.mauve) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
};
directory = {
2025-01-14 16:17:42 -06:00
format = surround (makeColor colours.blue) "[󰉋 $path]($style)[$read_only]($read_only_style)";
2025-01-08 01:05:45 -06:00
read_only = " ";
2025-01-14 16:17:42 -06:00
read_only_style = makeStyle (makeColor colours.blue) (makeColor colours.crust);
style = makeStyle (makeColor colours.blue) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
truncation_length = 1;
truncate_to_repo = false;
};
git_branch = {
2025-01-14 16:17:42 -06:00
format = surround (makeColor colours.peach) "[$symbol $branch]($style)";
style = makeStyle (makeColor colours.peach) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
symbol = "";
};
git_status = {
format = "[ \\[$all_status$ahead_behind\\]]($style)";
2025-01-14 16:17:42 -06:00
style = makeStyle (makeColor colours.yellow) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
};
hostname = {
2025-01-14 16:17:42 -06:00
format = surround (makeColor colours.sapphire) "[$ssh_symbol$hostname]($style)";
2025-01-08 01:05:45 -06:00
ssh_symbol = "󰖟 ";
2025-01-14 16:17:42 -06:00
style = makeStyle (makeColor colours.sapphire) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
};
pijul_channel = {
disabled = false;
2025-01-14 16:17:42 -06:00
format = surround (makeColor colours.peach) "[$symbol $channel]($style)";
style = makeStyle (makeColor colours.peach) (makeColor colours.crust);
2025-01-08 01:05:45 -06:00
symbol = "";
};
format = lib.concatStrings [
"$hostname"
"$directory"
"$pijul_channel"
"$git_branch"
"$cmd_duration"
"$character "
];
2024-11-20 17:47:07 -06:00
}