use base16 for fish

This commit is contained in:
Sean Kovacs 2026-02-19 11:30:42 -05:00
commit ab17e1f300
Signed by: sckova
GPG key ID: 00F325187C68651A
2 changed files with 25 additions and 6 deletions

View file

@ -1,4 +1,9 @@
{ pkgs, ... }: {
pkgs,
config,
lib,
...
}:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
kdePackages.qttools kdePackages.qttools
@ -14,6 +19,7 @@
gzip = "pigz"; gzip = "pigz";
ls = "eza"; ls = "eza";
gl = "git log"; gl = "git log";
gd = "git diff";
ga = "git add -v ."; ga = "git add -v .";
gac = "git add -v . && git commit"; gac = "git add -v . && git commit";
gaca = "git add -v . && git commit --amend --no-edit"; gaca = "git add -v . && git commit --amend --no-edit";
@ -39,5 +45,18 @@
}; };
}; };
}; };
home.file.".config/fish/colors.fish" = {
text = lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: value: "set -g color_${name} ${value}") (
lib.filterAttrs (
n: v: builtins.isString v && builtins.match "^base[0-9A-Fa-f]{2}$" n != null
) config.scheme
)
++ [ "set -g color_accent ${config.scheme.${config.colors.accent}}" ]
);
force = true;
};
programs.man.generateCaches = false; programs.man.generateCaches = false;
} }

View file

@ -1,4 +1,4 @@
# source ~/.config/fish/colors.fish source ~/.config/fish/colors.fish
set -l last_status $status set -l last_status $status
set -l nix_shell_info ( set -l nix_shell_info (
if test -n "$IN_NIX_SHELL" if test -n "$IN_NIX_SHELL"
@ -11,14 +11,14 @@ set -g color_cwd green
# Set host color based on hostname # Set host color based on hostname
if test (hostname) = peach if test (hostname) = peach
set -g color_host yellow set -g color_host $color_accent
else if test (hostname) = alien else if test (hostname) = alien
set -g color_host yellow set -g color_host $color_accent
else if test (hostname) = vm else if test (hostname) = vm
set -g color_host yellow set -g color_host $color_accent
set -g color_cwd normal set -g color_cwd normal
else if test (uname) = Darwin else if test (uname) = Darwin
set -g color_host yellow set -g color_host $color_base0A
end end
set -l user_host (set_color $color_user)"$USER"(set_color normal)"@"(set_color $color_host)(prompt_hostname)(set_color normal) set -l user_host (set_color $color_user)"$USER"(set_color normal)"@"(set_color $color_host)(prompt_hostname)(set_color normal)