From da0a6c557360ea235ce80c06239dd272c30bdeaa Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 18 Feb 2024 20:33:13 +0900 Subject: [PATCH] Testing --- home-manager/common/software/cli/starship.nix | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/home-manager/common/software/cli/starship.nix b/home-manager/common/software/cli/starship.nix index ffcbb85f..5c9a4383 100644 --- a/home-manager/common/software/cli/starship.nix +++ b/home-manager/common/software/cli/starship.nix @@ -1,63 +1,65 @@ { config, lib, ... }: let - gitColor = "#${config.lib.stylix.colors.base08}"; - hostnameColor = "#${config.lib.stylix.colors.base0A}"; - dirColor = "#${config.lib.stylix.colors.base0C}"; - timeColor = "#${config.lib.stylix.colors.base00}"; - redColor = "#${config.lib.stylix.colors.base09}"; + usernameColor = "#${config.lib.stylix.colors.base07}"; + directoryColor = "#${config.lib.stylix.colors.base06}"; + statusolor = "#${config.lib.stylix.colors.base05}"; + errorColor = "#${config.lib.stylix.colors.base04}"; + fgColor = "#${config.lib.stylix.colors.base02}"; + blackColor = "#${config.lib.stylix.colors.base00}"; + whiteColor = "#${config.lib.stylix.colors.base07}"; in -{ + { programs.starship = { enable = true; enableBashIntegration = true; settings = { format = lib.concatStrings [ - "$os" - "» " + "[](${usernameColor})" "$username" "$hostname" - " »" + "[](bg:${directoryColor} fg:${usernameColor})" "$directory" - " »" + "[](fg:${directoryColor} bg:${statusolor})" "$git_branch" "$git_status" "$rust" "$docker_context" "$nix_shell" + "[](fg:${statusolor} bg:${errorColor})" "$status" - + "[ ](fg:${errorColor})" ]; username = { show_always = true; - style_user = "fg:${hostnameColor}"; - style_root = "fg:${hostnameColor}"; + style_user = "fg:${whiteColor} bg:${usernameColor}"; + style_root = "fg:${whiteColor} bg:${usernameColor}"; format = "[$user]($style)"; disabled = false; }; hostname = { ssh_only = true; - style = "fg:${hostnameColor}"; + style = "fg:${fgColor} bg:${usernameColor}"; format = "[@$hostname]($style)"; disabled = false; }; os = { - style = "fg:${hostnameColor}"; - disabled = false; + style = "bg:${usernameColor}"; + disabled = true; }; nix_shell = { - disabled = true; + disabled = false; heuristic = true; symbol = " "; - format = "[$symbol$state(\($name\))]($style)"; - style = "fg:${gitColor}"; + format = "[$symbol]($style)"; + style = "fg:${fgColor} bg:${statusolor}"; }; directory = { - style = "fg:${dirColor}"; + style = "fg:${fgColor} bg:${directoryColor}"; format = "[ $path ]($style)"; truncation_length = 3; truncation_symbol = "…/"; @@ -71,27 +73,28 @@ in git_branch = { symbol = ""; - style = "fg:${gitColor}"; + style = "fg:${fgColor} bg:${statusolor}"; format = "[ $symbol $branch ]($style)"; }; git_status = { - style = "fg:${gitColor}"; - format = "[$all_status$ahead_behind]($style)"; + style = "fg:${fgColor} bg:${statusolor}"; + format = "[$all_status$ahead_behind ]($style)"; }; status = { - style = "fg:${redColor}"; - format = "[$status ]($style) » "; + style = "fg:${fgColor} bg:${errorColor}"; + format = "[$status ]($style)"; disabled = false; }; time = { disabled = false; time_format = "%R"; # Hour:Minute Format - style = "fg:${timeColor}"; + style = "fg:${fgColor} bg:${blackColor}"; format = "[ $time]($style)"; }; }; }; } +