11.stylix/modules/fuzzel/hm.nix
NAHO 3fb65013f7 treewide: rename mkTarget's configElements and extraOptions options
Rename mkTarget's 'configElements' argument to 'config' and
'extraOptions' to 'options' to provide a more transparent interface with
the underlying Nixpkgs module system.

(cherry picked from commit 16df6b8448)
2025-12-10 07:14:37 -10:00

43 lines
1.1 KiB
Nix

{ mkTarget, lib, ... }:
mkTarget {
name = "fuzzel";
humanName = "Fuzzel";
config = [
(
{ fonts }:
{
programs.fuzzel.settings.main.font =
"${fonts.sansSerif.name}:size=${toString fonts.sizes.popups}";
}
)
(
{ colors, opacity }:
let
opacity' = lib.toHexString (builtins.ceil (opacity.popups * 255));
in
{
programs.fuzzel.settings.colors = with colors; {
background = "${base00-hex}${opacity'}";
text = "${base05-hex}ff";
placeholder = "${base03-hex}ff";
prompt = "${base05-hex}ff";
input = "${base05-hex}ff";
match = "${base0A-hex}ff";
selection = "${base03-hex}ff";
selection-text = "${base05-hex}ff";
selection-match = "${base0A-hex}ff";
counter = "${base06-hex}ff";
border = "${base0D-hex}ff";
};
}
)
(
{ polarity, icons }:
{
programs.fuzzel.settings.main."icon-theme" =
if (polarity == "dark") then icons.dark else icons.light;
}
)
];
}