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

116 lines
3.1 KiB
Nix
Raw Normal View History

{ config, lib, ... }:
2024-02-14 13:31:14 +09:00
let
2024-02-18 20:59:12 +09:00
usernameBG = "#${config.lib.stylix.colors.base08}";
directoryBG = "#${config.lib.stylix.colors.base09}";
statusBG = "#${config.lib.stylix.colors.base0A}";
errorBG = "#${config.lib.stylix.colors.base0B}";
timeBG = "#${config.lib.stylix.colors.base06}";
usernameFG = "#${config.lib.stylix.colors.base06}";
directoryFG = "#${config.lib.stylix.colors.base07}";
statusFG = "#${config.lib.stylix.colors.base01}";
errorFG = "#${config.lib.stylix.colors.base00}";
timeFG = "#${config.lib.stylix.colors.base0C}";
2024-03-19 09:39:24 +09:00
# blackColor = "#${config.lib.stylix.colors.base00}";
# whiteColor = "#${config.lib.stylix.colors.base06}";
2024-02-14 13:31:14 +09:00
in
2024-02-18 20:33:13 +09:00
{
2024-02-15 22:00:13 +09:00
programs.starship = {
enable = true;
enableBashIntegration = true;
2024-04-29 09:55:56 +09:00
enableFishIntegration = true;
2024-02-15 22:00:13 +09:00
settings = {
2024-01-19 13:13:18 +09:00
format = lib.concatStrings [
2024-03-20 11:44:14 +09:00
# "[](${usernameBG})"
# "$username"
# "$hostname"
# "[](bg:${directoryBG} fg:${usernameBG})"
"[](${directoryBG})"
2024-01-19 13:13:18 +09:00
"$directory"
2024-02-18 20:59:12 +09:00
"[](fg:${directoryBG} bg:${statusBG})"
2024-02-06 13:39:16 +09:00
"$git_branch"
2024-01-19 13:13:18 +09:00
"$git_status"
"$rust"
"$docker_context"
2024-02-06 13:28:33 +09:00
"$nix_shell"
2024-02-18 20:59:12 +09:00
"[](fg:${statusBG} bg:${errorBG})"
2024-01-19 13:25:55 +09:00
"$status"
2024-02-18 20:59:12 +09:00
"[ ](fg:${errorBG})"
2024-01-19 13:13:18 +09:00
];
username = {
show_always = true;
2024-02-18 20:59:12 +09:00
style_user = "fg:${usernameFG} bg:${usernameBG}";
style_root = "fg:${usernameFG} bg:${usernameBG}";
2024-01-19 14:00:54 +09:00
format = "[$user]($style)";
2024-01-19 13:13:18 +09:00
disabled = false;
};
2024-01-19 13:18:47 +09:00
hostname = {
ssh_only = true;
2024-02-18 20:59:12 +09:00
style = "fg:${usernameFG} bg:${usernameBG}";
2024-01-19 13:21:53 +09:00
format = "[@$hostname]($style)";
2024-01-19 13:18:47 +09:00
disabled = false;
};
2024-01-19 13:13:18 +09:00
os = {
2024-02-18 20:59:12 +09:00
style = "bg:${usernameBG}";
2024-02-18 20:33:13 +09:00
disabled = true;
2024-01-19 13:13:18 +09:00
};
2024-02-06 13:37:34 +09:00
nix_shell = {
2024-02-18 20:33:13 +09:00
disabled = false;
2024-02-06 13:45:13 +09:00
heuristic = true;
2024-02-06 13:56:04 +09:00
symbol = " ";
2024-02-18 20:33:13 +09:00
format = "[$symbol]($style)";
2024-02-18 20:59:12 +09:00
style = "fg:${statusFG} bg:${statusBG}";
2024-02-06 13:37:34 +09:00
};
2024-01-19 13:13:18 +09:00
directory = {
2024-02-18 20:59:12 +09:00
style = "fg:${directoryFG} bg:${directoryBG}";
2024-01-19 13:13:18 +09:00
format = "[ $path ]($style)";
2024-02-06 13:41:03 +09:00
truncation_length = 3;
2024-01-19 13:13:18 +09:00
truncation_symbol = "/";
substitutions = {
Documents = "󰈙 ";
Downloads = " ";
Music = " ";
Pictures = " ";
};
};
git_branch = {
symbol = "";
2024-02-18 20:59:12 +09:00
style = "fg:${statusFG} bg:${statusBG}";
2024-02-06 13:41:53 +09:00
format = "[ $symbol $branch ]($style)";
2024-01-19 13:13:18 +09:00
};
git_status = {
2024-02-18 20:59:12 +09:00
style = "fg:${statusFG} bg:${statusBG}";
2024-02-18 20:33:13 +09:00
format = "[$all_status$ahead_behind ]($style)";
2024-01-19 13:13:18 +09:00
};
2024-01-19 14:07:17 +09:00
status = {
2024-02-18 20:59:12 +09:00
style = "fg:${errorFG} bg:${errorBG}";
2024-02-18 20:43:50 +09:00
format = "[ $status]($style)";
2024-01-19 14:07:49 +09:00
disabled = false;
2024-01-19 13:13:18 +09:00
};
2024-04-01 12:38:00 +09:00
rust = {
disabled = false;
format = "[ via $symbol($version )]($style)";
style = "fg:${statusFG} bg:${statusBG}";
};
2024-01-19 13:13:18 +09:00
time = {
disabled = false;
time_format = "%R"; # Hour:Minute Format
2024-02-18 20:59:12 +09:00
style = "fg:${timeFG} bg:${timeBG}";
2024-01-19 14:06:20 +09:00
format = "[ $time]($style)";
2024-01-19 13:13:18 +09:00
};
};
2024-02-15 22:00:13 +09:00
};
}
2024-02-18 20:33:13 +09:00