foot: set colors manually instead of relying on tinted-theming (#2235)

Link: https://github.com/nix-community/stylix/pull/2235
Closes: https://github.com/nix-community/stylix/issues/2234

Tested-by: 0xda157 <da157@voidq.com>
Reviewed-by: 0xda157 <da157@voidq.com>
This commit is contained in:
Karun Sandhu 2026-04-03 22:15:34 +02:00 committed by GitHub
parent f95500a6d5
commit 6d0502ef74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 42 deletions

18
flake.lock generated
View file

@ -188,7 +188,6 @@
"nixpkgs": "nixpkgs",
"nur": "nur",
"systems": "systems",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
@ -210,23 +209,6 @@
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {

View file

@ -63,18 +63,6 @@
};
};
tinted-foot = {
# Lock the tinted-foot input to prevent upstream breaking changes.
#
# Considering that Stylix eventually re-implements this input's
# functionality [1], it might be easiest to lock this input to avoid
# wasted maintenance effort.
#
# [1]: https://github.com/nix-community/stylix/issues/571
url = "github:tinted-theming/tinted-foot/fd1b924b6c45c3e4465e8a849e67ea82933fcbe4";
flake = false;
};
tinted-kitty = {
url = "github:tinted-theming/tinted-kitty";
flake = false;

View file

@ -1,4 +1,4 @@
{ lib, mkTarget, ... }:
{ mkTarget, ... }:
mkTarget {
config = [
(
@ -11,19 +11,45 @@ mkTarget {
}
)
(
{ opacity }:
{
programs.foot.settings.colors.alpha = opacity.terminal;
}
)
(
{ colors, inputs }:
polarity,
opacity,
colors,
}:
let
colorTheme = if polarity == "either" then "light" else polarity;
in
{
programs.foot.settings.main.include = lib.singleton (
toString (colors {
templateRepo = inputs.tinted-foot;
})
);
programs.foot.settings = {
main.initial-color-theme = colorTheme;
"colors-${colorTheme}" = {
alpha = opacity.terminal;
foreground = colors.base05;
background = colors.base00;
regular0 = colors.base00;
regular1 = colors.base08;
regular2 = colors.base0B;
regular3 = colors.base0A;
regular4 = colors.base0D;
regular5 = colors.base0E;
regular6 = colors.base0C;
regular7 = colors.base05;
bright0 = colors.base03;
bright1 = colors.base08;
bright2 = colors.base0B;
bright3 = colors.base0A;
bright4 = colors.base0D;
bright5 = colors.base0E;
bright6 = colors.base0C;
bright7 = colors.base07;
"16" = colors.base09;
"17" = colors.base0F;
"18" = colors.base01;
"19" = colors.base02;
"20" = colors.base04;
"21" = colors.base06;
};
};
}
)
];