2024-11-17 22:53:42 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
2025-01-12 23:29:50 +00:00
|
|
|
}: let
|
2025-01-14 05:05:10 +00:00
|
|
|
inherit (lib) mkDefault;
|
2024-11-17 22:53:42 +00:00
|
|
|
|
|
|
|
cfg = config.marleyos.programs.starship;
|
2025-01-12 23:29:50 +00:00
|
|
|
in {
|
2025-03-02 18:41:56 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2025-03-02 20:04:19 +00:00
|
|
|
programs.starship.settings = with config.lib.stylix.colors.withHashtag; let
|
|
|
|
mkFormat = t: " [](fg:${base02})[${t}]($style)[](fg:${base02}) ";
|
2025-01-12 23:29:50 +00:00
|
|
|
langFormat = mkFormat "$symbol$version";
|
|
|
|
in {
|
2025-01-14 05:05:10 +00:00
|
|
|
format = mkDefault (lib.concatStrings [
|
2025-01-12 23:29:50 +00:00
|
|
|
"$username"
|
|
|
|
"$directory"
|
|
|
|
"$nix_shell"
|
|
|
|
"$git_branch"
|
|
|
|
"$git_status"
|
|
|
|
"$fill"
|
|
|
|
"$c"
|
|
|
|
"$elixir"
|
|
|
|
"$elm"
|
|
|
|
"$golang"
|
|
|
|
"$haskell"
|
|
|
|
"$java"
|
|
|
|
"$julia"
|
|
|
|
"$nodejs"
|
|
|
|
"$nim"
|
|
|
|
"$rust"
|
|
|
|
"$scala"
|
|
|
|
"$python"
|
|
|
|
"$time"
|
|
|
|
"$line_break"
|
|
|
|
"$character"
|
|
|
|
]);
|
|
|
|
|
|
|
|
username = {
|
|
|
|
disabled = mkDefault false;
|
|
|
|
format = mkDefault (mkFormat " $user ");
|
|
|
|
show_always = mkDefault true;
|
2025-03-02 20:04:19 +00:00
|
|
|
style_root = mkDefault "bg:${base02} fg:${base0D}";
|
|
|
|
style_user = mkDefault "bg:${base02} fg:${base0D}";
|
2025-01-12 23:29:50 +00:00
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
directory = {
|
|
|
|
format = mkDefault (mkFormat " $path ");
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
truncation_length = mkDefault 3;
|
|
|
|
truncation_symbol = mkDefault "…/";
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
substitutions = {
|
|
|
|
Documents = mkDefault "";
|
|
|
|
Downloads = mkDefault " ";
|
|
|
|
Music = mkDefault " ";
|
|
|
|
Pictures = mkDefault " ";
|
2024-11-17 22:53:42 +00:00
|
|
|
};
|
2025-01-12 23:29:50 +00:00
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
git_branch = {
|
|
|
|
format = mkDefault (mkFormat " $symbol $branch ");
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0C}";
|
2025-01-12 23:29:50 +00:00
|
|
|
symbol = mkDefault "";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
git_status = {
|
|
|
|
disabled = mkDefault false;
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base08}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault (mkFormat " $all_status$ahead_behind");
|
2025-03-02 20:04:19 +00:00
|
|
|
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})";
|
2025-01-12 23:29:50 +00:00
|
|
|
deleted = mkDefault "[✘\\($count\\)](style)";
|
2025-03-02 20:04:19 +00:00
|
|
|
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})";
|
2025-01-12 23:29:50 +00:00
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
fill = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "fg:${base02}";
|
2025-01-12 23:29:50 +00:00
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
time = {
|
|
|
|
disabled = mkDefault false;
|
|
|
|
format = mkDefault (mkFormat " $time ");
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0A}";
|
2025-01-12 23:29:50 +00:00
|
|
|
time_format = mkDefault "%I:%M%P";
|
|
|
|
use_12hr = mkDefault true;
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
character = let
|
|
|
|
vim = "";
|
2025-03-02 20:04:19 +00:00
|
|
|
mkChar = sym: col: " [${sym}](fg:${col}) [](fg:${base0C})";
|
2025-01-12 23:29:50 +00:00
|
|
|
in {
|
2025-03-02 20:04:19 +00:00
|
|
|
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}";
|
2025-01-12 23:29:50 +00:00
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
### Languages ###
|
|
|
|
c = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
elixir = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
elm = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
haskell = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
java = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
julia = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
nodejs = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
nim = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
python = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
rust = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault "";
|
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
|
2025-01-12 23:29:50 +00:00
|
|
|
scala = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault langFormat;
|
|
|
|
disabled = false;
|
|
|
|
symbol = " ";
|
|
|
|
};
|
|
|
|
|
|
|
|
### Tools ###
|
|
|
|
conda = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = mkDefault "bg:${base02} fg:${base0B}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault (mkFormat "$symbol$environment");
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault "🅒 ";
|
|
|
|
};
|
|
|
|
|
|
|
|
nix_shell = {
|
2025-03-02 20:04:19 +00:00
|
|
|
style = "bg:${base02} fg:${base0C}";
|
2025-01-12 23:29:50 +00:00
|
|
|
format = mkDefault (mkFormat " $symbol $state( \($name\)) ");
|
|
|
|
disabled = mkDefault false;
|
|
|
|
symbol = mkDefault " ";
|
2024-11-17 22:53:42 +00:00
|
|
|
};
|
2025-01-12 23:29:50 +00:00
|
|
|
};
|
2024-11-17 22:53:42 +00:00
|
|
|
};
|
|
|
|
}
|