11.stylix/modules/avizo/hm.nix
awwpotato f122d70925
avizo: hotfix aviOpcaity missing (#1023)
Closes: https://github.com/danth/stylix/issues/1018
Fixes: ff9ae322bc ("treewide: clean up `with` and stuff (#975)")
Link: https://github.com/danth/stylix/pull/1023

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-03-19 23:14:04 +01:00

32 lines
1 KiB
Nix

{
config,
lib,
options,
...
}:
{
options.stylix.targets.avizo.enable =
config.lib.stylix.mkEnableTarget "Avizo" true;
# Referenced https://github.com/stacyharper/base16-mako
config = lib.optionalAttrs (options.services ? avizo) (
lib.mkIf (config.stylix.enable && config.stylix.targets.avizo.enable) {
services.avizo = {
settings = {
default =
with config.lib.stylix.colors;
let
aviOpacity = toString config.stylix.opacity.popups;
in
{
background = "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, ${aviOpacity})";
border-color = "rgba(${base0D-rgb-r}, ${base0D-rgb-g}, ${base0D-rgb-b}, ${aviOpacity})";
bar-fg-color = "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, ${aviOpacity})";
bar-bg-color = "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, ${aviOpacity})";
image-opacity = aviOpacity;
};
};
};
}
);
}