nix/home-manager/common/software/cli/starship.nix

101 lines
2.6 KiB
Nix
Raw Normal View History

{ config, lib, ... }:
2024-02-14 05:31:14 +01:00
let
2024-02-18 12:33:13 +01:00
usernameColor = "#${config.lib.stylix.colors.base07}";
directoryColor = "#${config.lib.stylix.colors.base06}";
statusolor = "#${config.lib.stylix.colors.base05}";
errorColor = "#${config.lib.stylix.colors.base04}";
fgColor = "#${config.lib.stylix.colors.base02}";
blackColor = "#${config.lib.stylix.colors.base00}";
whiteColor = "#${config.lib.stylix.colors.base07}";
2024-02-14 05:31:14 +01:00
in
2024-02-18 12:33:13 +01:00
{
2024-02-15 14:00:13 +01:00
programs.starship = {
enable = true;
enableBashIntegration = true;
settings = {
2024-01-19 05:13:18 +01:00
format = lib.concatStrings [
2024-02-18 12:33:13 +01:00
"[](${usernameColor})"
2024-01-19 05:13:18 +01:00
"$username"
2024-01-19 05:18:47 +01:00
"$hostname"
2024-02-18 12:33:13 +01:00
"[](bg:${directoryColor} fg:${usernameColor})"
2024-01-19 05:13:18 +01:00
"$directory"
2024-02-18 12:33:13 +01:00
"[](fg:${directoryColor} bg:${statusolor})"
2024-02-06 05:39:16 +01:00
"$git_branch"
2024-01-19 05:13:18 +01:00
"$git_status"
"$rust"
"$docker_context"
2024-02-06 05:28:33 +01:00
"$nix_shell"
2024-02-18 12:33:13 +01:00
"[](fg:${statusolor} bg:${errorColor})"
2024-01-19 05:25:55 +01:00
"$status"
2024-02-18 12:33:13 +01:00
"[ ](fg:${errorColor})"
2024-01-19 05:13:18 +01:00
];
username = {
show_always = true;
2024-02-18 12:33:13 +01:00
style_user = "fg:${whiteColor} bg:${usernameColor}";
style_root = "fg:${whiteColor} bg:${usernameColor}";
2024-01-19 06:00:54 +01:00
format = "[$user]($style)";
2024-01-19 05:13:18 +01:00
disabled = false;
};
2024-01-19 05:18:47 +01:00
hostname = {
ssh_only = true;
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${usernameColor}";
2024-01-19 05:21:53 +01:00
format = "[@$hostname]($style)";
2024-01-19 05:18:47 +01:00
disabled = false;
};
2024-01-19 05:13:18 +01:00
os = {
2024-02-18 12:33:13 +01:00
style = "bg:${usernameColor}";
disabled = true;
2024-01-19 05:13:18 +01:00
};
2024-02-06 05:37:34 +01:00
nix_shell = {
2024-02-18 12:33:13 +01:00
disabled = false;
2024-02-06 05:45:13 +01:00
heuristic = true;
2024-02-06 05:56:04 +01:00
symbol = " ";
2024-02-18 12:33:13 +01:00
format = "[$symbol]($style)";
style = "fg:${fgColor} bg:${statusolor}";
2024-02-06 05:37:34 +01:00
};
2024-01-19 05:13:18 +01:00
directory = {
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${directoryColor}";
2024-01-19 05:13:18 +01:00
format = "[ $path ]($style)";
2024-02-06 05:41:03 +01:00
truncation_length = 3;
2024-01-19 05:13:18 +01:00
truncation_symbol = "/";
substitutions = {
Documents = "󰈙 ";
Downloads = " ";
Music = " ";
Pictures = " ";
};
};
git_branch = {
symbol = "";
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${statusolor}";
2024-02-06 05:41:53 +01:00
format = "[ $symbol $branch ]($style)";
2024-01-19 05:13:18 +01:00
};
git_status = {
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${statusolor}";
format = "[$all_status$ahead_behind ]($style)";
2024-01-19 05:13:18 +01:00
};
2024-01-19 06:07:17 +01:00
status = {
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${errorColor}";
format = "[$status ]($style)";
2024-01-19 06:07:49 +01:00
disabled = false;
2024-01-19 05:13:18 +01:00
};
time = {
disabled = false;
time_format = "%R"; # Hour:Minute Format
2024-02-18 12:33:13 +01:00
style = "fg:${fgColor} bg:${blackColor}";
2024-01-19 06:06:20 +01:00
format = "[ $time]($style)";
2024-01-19 05:13:18 +01:00
};
};
2024-02-15 14:00:13 +01:00
};
}
2024-02-18 12:33:13 +01:00