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

102 lines
2.6 KiB
Nix
Raw Normal View History

2024-02-14 05:36:45 +01:00
{ config, pkgs, lib, stylix, ... }:
2024-02-14 05:31:14 +01:00
let
2024-02-14 14:46:17 +01:00
orangeColor = "#${config.lib.stylix.colors.base0C}";
2024-02-14 07:12:15 +01:00
yellowColor = "#${config.lib.stylix.colors.base0A}";
2024-02-14 14:46:17 +01:00
blueColor = "#${config.lib.stylix.colors.base08}";
2024-02-14 14:49:22 +01:00
whiteColor = "#${config.lib.stylix.colors.base07}";
2024-02-14 14:33:14 +01:00
blackColor = "#${config.lib.stylix.colors.base00}";
2024-02-14 14:46:17 +01:00
redColor = "#${config.lib.stylix.colors.base0E}";
2024-02-14 05:31:14 +01:00
in
{
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-01-19 05:29:34 +01:00
"[](${whiteColor})"
"$time"
2024-01-19 05:50:23 +01:00
"[](${whiteColor}) "
2024-01-19 05:29:34 +01:00
2024-01-19 05:13:18 +01:00
"[](${orangeColor})"
"$username"
2024-01-19 05:18:47 +01:00
"$hostname"
2024-01-19 05:13:18 +01:00
"[](bg:${yellowColor} fg:${orangeColor})"
"$directory"
"[](fg:${yellowColor} bg:${blueColor})"
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"
"[](fg:${blueColor} bg:${redColor})"
2024-01-19 05:25:55 +01:00
"$status"
2024-01-19 09:44:12 +01:00
"[ ](fg:${redColor})"
2024-01-19 05:13:18 +01:00
];
username = {
show_always = true;
style_user = "fg:${blackColor} bg:${orangeColor}";
style_root = "fg:${blackColor} bg:${orangeColor}";
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-01-19 05:21:21 +01:00
style = "fg:${blackColor} bg:${orangeColor}";
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 = {
style = "bg:${orangeColor}";
disabled = true;
};
2024-02-06 05:37:34 +01:00
nix_shell = {
disabled = false;
2024-02-06 05:45:13 +01:00
heuristic = true;
2024-02-06 05:56:04 +01:00
symbol = " ";
2024-02-06 05:48:35 +01:00
format = "[$symbol$state(\($name\))]($style)";
2024-02-06 05:46:45 +01:00
style = "fg:${whiteColor} bg:${blueColor}";
2024-02-06 05:37:34 +01:00
};
2024-01-19 05:13:18 +01:00
directory = {
style = "fg:${blackColor} bg:${yellowColor}";
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 = "";
style = "fg:${whiteColor} bg:${blueColor}";
2024-02-06 05:41:53 +01:00
format = "[ $symbol $branch ]($style)";
2024-01-19 05:13:18 +01:00
};
git_status = {
style = "fg:${whiteColor} bg:${blueColor}";
2024-02-06 05:41:03 +01:00
format = "[$all_status$ahead_behind ]($style)";
2024-01-19 05:13:18 +01:00
};
2024-01-19 06:07:17 +01:00
status = {
2024-01-19 09:33:31 +01:00
style = "fg:${whiteColor} bg:${redColor}";
2024-01-19 12:26:24 +01:00
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-01-19 05:30:49 +01:00
style = "fg:${blackColor} bg:${whiteColor}";
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-01-19 05:13:18 +01:00
}