add better starship config

This commit is contained in:
willifan 2024-10-07 23:17:37 +02:00
parent 35324b9bd4
commit 5426512545

View file

@ -1,23 +1,150 @@
{ lib, ... }:
{ lib, config, ... }:
{
home-manager.users.willifan.programs.starship = {
enable = true;
enableNushellIntegration = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"$line_break"
"$package"
"$line_break"
"$username"
"$directory"
"("
"$python"
"$conda"
"$nodejs"
"$c"
"$golang"
"$haskell"
"$java"
"$julia"
"$rust"
")"
"[](fg:fourth bg:fifth)"
"$docker_context"
"[](fg:fifth bg:sixth)"
"("
"$git_branch"
"$git_status"
")"
"[](fg:sixth bg:seventh)"
"$time"
"$cmd_duration"
"$character"
];
scan_timeout = 10;
character = {
success_symbol = "";
error_symbol = "";
};
};
palette = "pal";
# Disables the blank line at the start of the prompt
add_newline = true;
palettes.pal = {
first = config.lib.stylix.colors.withHashtag.base00;
second = config.lib.stylix.colors.withHashtag.base01;
third = config.lib.stylix.colors.withHashtag.base02;
fourth = config.lib.stylix.colors.withHashtag.base03;
fifth = config.lib.stylix.colors.withHashtag.base04;
sixth = config.lib.stylix.colors.withHashtag.base05;
seventh = config.lib.stylix.colors.withHashtag.base06;
eighth = config.lib.stylix.colors.withHashtag.base07;
error = config.lib.stylix.colors.withHashtag.base08;
# Text color:
black = "#272D37";
white = "#CBF4F8";
github = "#B02B10";
};
username = {
show_always = true;
style_user = "bg:second fg:white";
style_root = "bg:second fg:white";
format = "[$user]($style)[](fg:second bg:third)";
};
directory = {
style = "bg:third fg:white";
format = "[ $path ]($style)($style)[$read_only]($read_only_style)[](fg:third bg:fourth)";
truncation_symbol = "/";
truncate_to_repo = true;
read_only =" ";
};
c = {
symbol = " ";
version_format = "\${raw}";
style = "bg:fourth fg:white";
format = "[$symbol($version) ]($style)";
};
golang = {
symbol = " ";
version_format = "\${raw}";
style = "bg:fourth fg:white";
format = "[$symbol($version) ]($style)";
};
python = {
symbol = " ";
version_format = "\${raw}";
style = "bg:fourth fg:white";
python_binary = ["./venv/bin/python" "./env/Scripts/python" "python" "python3" "python2"];
format = "[$symbol($version)]($style)[ (\($virtualenv\)) ](bg:fourth fg:white)";
};
conda = {
symbol = " ";
style = "bg:fourth fg:white";
ignore_base = false;
format = "[$symbol ($environment) ]($style)";
};
haskell = {
symbol = " ";
version_format = "\${raw}";
style = "bg:fourth fg:white";
format = "[$symbol($version) ]($style)";
};
rust = {
symbol = " ";
version_format = "\${raw}";
style = "bg:fourth fg:white";
format = "[$symbol($version) ]($style)";
};
docker_context = {
symbol = " ";
style = "bg:fifth fg:white";
format = "[$symbol $context ]($style)";
};
git_branch = {
symbol = " ";
style = "bg:sixth fg:white";
format = "[$symbol $branch ]($style)";
};
git_status = {
format = "([\($all_status$ahead_behind\) ]($style))";
style = "bold bg:sixth fg:github";
};
time = {
disabled = false;
time_format = "%R"; # Hour:Minute Format
style = "bg:seventh fg:white";
format = "[ $time]($style)[](fg:seventh bg:eighth)";
};
cmd_duration = {
style = "bg:eighth fg:white";
format = "[ $duration ]($style)";
};
character = {
success_symbol = "[](fg:eighth bg:eighth)[](fg:eighth)";
error_symbol = "[](fg:eighth bg:error)[](fg:error)";
};
};
};
}