71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
c = config.theme.colors;
|
|
in
|
|
{
|
|
programs.starship = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
format = lib.concatStrings [
|
|
"$username"
|
|
"$hostname"
|
|
"$directory"
|
|
"$git_branch"
|
|
"$git_status"
|
|
"$nix_shell"
|
|
"$cmd_duration"
|
|
"$line_break"
|
|
"$character"
|
|
];
|
|
|
|
username = {
|
|
style_user = "bold #${lib.removePrefix "#" c.green_b}";
|
|
style_root = "bold #${lib.removePrefix "#" c.red_b}";
|
|
format = "[$user]($style) ";
|
|
show_always = true;
|
|
};
|
|
|
|
hostname = {
|
|
ssh_only = false;
|
|
format = "at [($hostname)](bold #${lib.removePrefix "#" c.yellow_b}) ";
|
|
};
|
|
|
|
directory = {
|
|
style = "#${lib.removePrefix "#" c.blue_b}";
|
|
truncation_length = 4;
|
|
truncate_to_repo = false;
|
|
};
|
|
|
|
git_branch = {
|
|
symbol = " ";
|
|
style = "#${lib.removePrefix "#" c.purple_b}";
|
|
format = "[$symbol$branch]($style) ";
|
|
};
|
|
|
|
git_status = {
|
|
style = "#${lib.removePrefix "#" c.red_b}";
|
|
format = "[$all_status$ahead_behind]($style) ";
|
|
};
|
|
|
|
nix_shell = {
|
|
symbol = " ";
|
|
style = "#${lib.removePrefix "#" c.aqua_b}";
|
|
format = "[$symbol$state]($style) ";
|
|
};
|
|
|
|
cmd_duration = {
|
|
min_time = 2000;
|
|
style = "#${lib.removePrefix "#" c.yellow}";
|
|
format = "took [$duration]($style) ";
|
|
};
|
|
|
|
character = {
|
|
success_symbol = "[»](bold #${lib.removePrefix "#" c.green_b})";
|
|
error_symbol = "[»](bold #${lib.removePrefix "#" c.red_b})";
|
|
};
|
|
};
|
|
};
|
|
}
|