mirror of
https://github.com/danth/stylix
synced 2025-02-18 06:18:32 +00:00
Add a 'stylix.enable' option to enable or disable all Stylix modules in order to resolve issues similar to [2]. To align with the default 'lib.mkEnableOption' [1] behavior, 'stylix.enable' defaults to 'false'. BREAKING CHANGE: Stylix is disabled by default. To enable it, use: stylix.enable = true; [1]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/options.nix#L91-L105 [2]: https://github.com/danth/stylix/issues/216 Co-authored-by: Daniel Thwaites <danthwaites30@btinternet.com> Co-authored-by: Jalil David Salamé Messina <jalil.salame@gmail.com> Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
26 lines
992 B
Nix
26 lines
992 B
Nix
{ config, lib, options, ... }:
|
|
|
|
with config.lib.stylix.colors;
|
|
with config.stylix.fonts;
|
|
let
|
|
aviOpacity = toString config.stylix.opacity.popups;
|
|
in
|
|
{
|
|
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 = {
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
});
|
|
}
|