11.stylix/modules/tofi/hm.nix
NAHO 16df6b8448
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.
2025-12-10 14:48:20 +01:00

46 lines
1.2 KiB
Nix

{ mkTarget, lib, ... }:
mkTarget {
name = "tofi";
humanName = "Tofi";
config = [
(
{ fonts }:
{
programs.tofi.settings = {
font = fonts.monospace.name;
font-size = toString fonts.sizes.popups;
};
}
)
(
{ colors, opacity }:
{
programs.tofi.settings =
with colors.withHashtag;
let
opacity' = lib.toHexString (builtins.ceil (opacity.popups * 255));
background = base00 + opacity';
foreground = base05;
darkForeground = base04 + opacity';
selection = base03 + opacity';
in
{
background-color = background;
outline-color = darkForeground;
border-color = foreground;
text-color = foreground;
prompt-color = base0A;
prompt-background = background;
placeholder-color = selection;
input-background = background;
default-result-background = background;
selection-color = selection;
selection-background = background;
border-width = lib.mkDefault 4;
outline-width = lib.mkDefault 2;
};
}
)
];
}