From 05b6af19eab03e85e1c7069fea3af3843553f6b8 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Sat, 11 Apr 2026 02:07:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20starship=20=E6=94=B9=E7=94=A8=20Tokyo=20?= =?UTF-8?q?Night=20=E5=86=85=E8=81=94=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=B7=A8=E5=B9=B3=E5=8F=B0=20catppuccin=20IFD=20?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Justfile | 10 ++++-- home/shell/starship.nix | 69 +++++++++++++++++++++++++++++------------ home/theme.nix | 3 +- 3 files changed, 60 insertions(+), 22 deletions(-) diff --git a/Justfile b/Justfile index f493bc4..249ad7f 100644 --- a/Justfile +++ b/Justfile @@ -28,6 +28,12 @@ gc: show: nix flake show -# Check flake for errors +# Check configs evaluate without errors (platform-aware, avoids cross-platform IFD) +[macos] check: - nix flake check --no-build + @nix eval .#darwinConfigurations.mac-mini.system > /dev/null && echo "mac-mini: ok" + @nix eval .#darwinConfigurations.macbook-air.system > /dev/null && echo "macbook-air: ok" + +[linux] +check: + @nix eval .#nixosConfigurations.wsl.config.system.build.toplevel > /dev/null && echo "wsl: ok" diff --git a/home/shell/starship.nix b/home/shell/starship.nix index f1bb016..a51f777 100644 --- a/home/shell/starship.nix +++ b/home/shell/starship.nix @@ -9,30 +9,35 @@ add_newline = false; format = lib.concatStrings [ + "[░▒▓](#a3aed2)" "$os" - "$username" - "$hostname" + "[](bg:#769ff0 fg:#a3aed2)" "$directory" + "[](fg:#769ff0 bg:#394260)" "$git_branch" "$git_status" + "[](fg:#394260 bg:#212736)" "$nix_shell" "$nodejs" "$python" "$go" "$rust" "$docker_context" + "[](fg:#212736 bg:#1d2230)" "$cmd_duration" - "$line_break" - "$character" + "[ ](fg:#1d2230)" + "\n$character" ]; character = { - success_symbol = "[❯](bold green)"; + success_symbol = "[❯](bold #769ff0)"; error_symbol = "[❯](bold red)"; }; os = { disabled = false; + style = "bg:#a3aed2 fg:#090c0c"; + format = "[ $symbol]($style)"; symbols = { NixOS = " "; Linux = " "; @@ -42,6 +47,8 @@ }; directory = { + style = "fg:#e3e5e5 bg:#769ff0"; + format = "[ $path ]($style)"; truncation_length = 3; truncation_symbol = "…/"; substitutions = { @@ -51,35 +58,59 @@ }; }; - git_branch.symbol = " "; + git_branch = { + symbol = ""; + style = "bg:#394260"; + format = "[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)"; + }; git_status = { - format = "([\\[$all_status$ahead_behind\\]]($style) )"; + style = "bg:#394260"; + format = "[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)"; }; nix_shell = { symbol = " "; - format = "[$symbol$state( \\($name\\))]($style) "; + style = "bg:#212736"; + format = "[[ $symbol$state( \\($name\\)) ](fg:#769ff0 bg:#212736)]($style)"; + }; + + nodejs = { + symbol = ""; + style = "bg:#212736"; + format = "[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)"; + detect_extensions = [ ]; + }; + + python = { + symbol = ""; + style = "bg:#212736"; + format = "[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)"; + }; + + go = { + symbol = ""; + style = "bg:#212736"; + format = "[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)"; + }; + + rust = { + symbol = ""; + style = "bg:#212736"; + format = "[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)"; }; docker_context = { symbol = " "; - format = "[$symbol$context]($style) "; + style = "bg:#212736"; + format = "[[ $symbol $context ](fg:#769ff0 bg:#212736)]($style)"; }; cmd_duration = { min_time = 2000; - format = "[$duration]($style) "; + style = "bg:#1d2230"; + format = "[[ $duration ](fg:#a0a9cb bg:#1d2230)]($style)"; }; - - nodejs = { - format = "[$symbol($version)]($style) "; - detect_extensions = [ ]; - }; - - python.format = "[$symbol($version)]($style) "; - go.format = "[$symbol($version)]($style) "; - rust.format = "[$symbol($version)]($style) "; }; }; } diff --git a/home/theme.nix b/home/theme.nix index 1d85c11..b420479 100644 --- a/home/theme.nix +++ b/home/theme.nix @@ -4,6 +4,7 @@ catppuccin = { enable = true; flavor = "mocha"; - nvim.enable = false; # catppuccin-nvim require check broken in nixpkgs + nvim.enable = false; + starship.enable = false; }; }