fix(home/starship): Fix colors

This commit is contained in:
punkfairie 2025-03-02 12:04:19 -08:00
parent 0caf18c32c
commit e5ec3cad8c
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6

View file

@ -8,8 +8,8 @@
cfg = config.marleyos.programs.starship;
in {
config = lib.mkIf cfg.enable {
programs.starship.settings = let
mkFormat = t: " [](fg:base02)[${t}]($style)[](fg:base02) ";
programs.starship.settings = with config.lib.stylix.colors.withHashtag; let
mkFormat = t: " [](fg:${base02})[${t}]($style)[](fg:${base02}) ";
langFormat = mkFormat "$symbol$version";
in {
format = mkDefault (lib.concatStrings [
@ -36,29 +36,17 @@ in {
"$character"
]);
palettes.default = with config.lib.stylix.colors.withHashtag; mkDefault {
base02 = base02;
base08 = base08;
base09 = base09;
base0A = base0A;
base0B = base0B;
base0C = base0C;
base0D = base0D;
};
palette = "default";
username = {
disabled = mkDefault false;
format = mkDefault (mkFormat " 󰧱 $user ");
show_always = mkDefault true;
style_root = mkDefault "bg:base02 fg:base0D";
style_user = mkDefault "bg:base02 fg:base0D";
style_root = mkDefault "bg:${base02} fg:${base0D}";
style_user = mkDefault "bg:${base02} fg:${base0D}";
};
directory = {
format = mkDefault (mkFormat " $path ");
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
truncation_length = mkDefault 3;
truncation_symbol = mkDefault "/";
@ -72,123 +60,123 @@ in {
git_branch = {
format = mkDefault (mkFormat " $symbol $branch ");
style = mkDefault "bg:base02 fg:base0C";
style = mkDefault "bg:${base02} fg:${base0C}";
symbol = mkDefault "";
};
git_status = {
disabled = mkDefault false;
style = mkDefault "bg:base02 fg:base08";
style = mkDefault "bg:${base02} fg:${base08}";
format = mkDefault (mkFormat " $all_status$ahead_behind");
up_to_date = mkDefault "[ ](bg:base02 fg:base0D)";
untracked = mkDefault "[?\\($count\\)](bg:base02 fg:base09)";
stashed = mkDefault "[\\$](bg:base02 fg:base0D)";
modified = mkDefault "[!\\($count\\)](bg:base02 fg:base09)";
renamed = mkDefault "[»\\($count\\)](bg:base02 fg:base0D)";
up_to_date = mkDefault "[ ](bg:${base02} fg:${base0D})";
untracked = mkDefault "[?\\($count\\)](bg:${base02} fg:${base09})";
stashed = mkDefault "[\\$](bg:${base02} fg:${base0D})";
modified = mkDefault "[!\\($count\\)](bg:${base02} fg:${base09})";
renamed = mkDefault "[»\\($count\\)](bg:${base02} fg:${base0D})";
deleted = mkDefault "[\\($count\\)](style)";
staged = mkDefault "[++\\($count\\)](bg:base02 fg:base09)";
ahead = mkDefault "[\\(\${count}\\)](bg:base02 fg:base0C)";
diverged = mkDefault "[\\[](bg:base02 fg:base0D)[\\(\${ahead_count}\\)](bg:base02 fg:base0C)[\\(\${behind_count}\\)](bg:base02 fg:base0A)[\\]](bg:base02 fg:base0D)";
behind = mkDefault "[\\(\${count}\\)](bg:base02 fg:base0A)";
staged = mkDefault "[++\\($count\\)](bg:${base02} fg:${base09})";
ahead = mkDefault "[\\(\${count}\\)](bg:${base02} fg:${base0C})";
diverged = mkDefault "[\\[](bg:${base02} fg:${base0D})[\\(\${ahead_count}\\)](bg:${base02} fg:${base0C})[\\(\${behind_count}\\)](bg:${base02} fg:${base0A})[\\]](bg:${base02} fg:${base0D})";
behind = mkDefault "[\\(\${count}\\)](bg:${base02} fg:${base0A})";
};
fill = {
style = mkDefault "fg:base02";
style = mkDefault "fg:${base02}";
symbol = mkDefault " ";
};
time = {
disabled = mkDefault false;
format = mkDefault (mkFormat " $time 󰴈 ");
style = mkDefault "bg:base02 fg:base0A";
style = mkDefault "bg:${base02} fg:${base0A}";
time_format = mkDefault "%I:%M%P";
use_12hr = mkDefault true;
};
character = let
vim = "";
mkChar = sym: col: " [${sym}](fg:${col}) [󰄾](fg:base0C)";
mkChar = sym: col: " [${sym}](fg:${col}) [󰄾](fg:${base0C})";
in {
success_symbol = mkChar "" "base0D";
error_symbol = mkChar "󰋔" "base08";
vimcmd_symbol = mkChar vim "base0A";
vimcmd_replace_one_symbol = mkChar vim "base0C";
vimcmd_replace_symbol = mkChar vim "base0C";
vimcmd_visual_symbol = mkChar vim "base0D";
success_symbol = mkChar "" "${base0D}";
error_symbol = mkChar "󰋔" "${base08}";
vimcmd_symbol = mkChar vim "${base0A}";
vimcmd_replace_one_symbol = mkChar vim "${base0C}";
vimcmd_replace_symbol = mkChar vim "${base0C}";
vimcmd_visual_symbol = mkChar vim "${base0D}";
};
### Languages ###
c = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
elixir = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
elm = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
haskell = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
java = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
julia = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault " ";
};
nodejs = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "󰎙 ";
};
nim = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "󰆥 ";
};
python = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
disabled = mkDefault false;
symbol = mkDefault " ";
};
rust = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = mkDefault false;
symbol = mkDefault "";
};
scala = {
style = "bg:base02 fg:base0B";
style = "bg:${base02} fg:${base0B}";
format = mkDefault langFormat;
disabled = false;
symbol = " ";
@ -196,14 +184,14 @@ in {
### Tools ###
conda = {
style = mkDefault "bg:base02 fg:base0B";
style = mkDefault "bg:${base02} fg:${base0B}";
format = mkDefault (mkFormat "$symbol$environment");
disabled = mkDefault false;
symbol = mkDefault "🅒 ";
};
nix_shell = {
style = "bg:base02 fg:base0C";
style = "bg:${base02} fg:${base0C}";
format = mkDefault (mkFormat " $symbol $state( \($name\)) ");
disabled = mkDefault false;
symbol = mkDefault " ";