mirror of
https://github.com/danth/stylix
synced 2024-11-22 20:23:15 +00:00
7682713f6a
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>
37 lines
961 B
Nix
37 lines
961 B
Nix
{ config, lib, ... }:
|
|
|
|
with config.lib.stylix.colors.withHashtag;
|
|
with config.stylix.fonts;
|
|
let
|
|
dunstOpacity = lib.toHexString ((((builtins.ceil (config.stylix.opacity.popups * 100)) * 255) / 100));
|
|
in {
|
|
options.stylix.targets.dunst.enable =
|
|
config.lib.stylix.mkEnableTarget "Dunst" true;
|
|
|
|
config = lib.mkIf (config.stylix.enable && config.stylix.targets.dunst.enable) {
|
|
services.dunst.settings = {
|
|
global = {
|
|
separator_color = base02;
|
|
font = "${sansSerif.name} ${toString sizes.popups}";
|
|
};
|
|
|
|
urgency_low = {
|
|
background = base01 + dunstOpacity;
|
|
foreground = base05;
|
|
frame_color = base0B;
|
|
};
|
|
|
|
urgency_normal = {
|
|
background = base01 + dunstOpacity;
|
|
foreground = base05;
|
|
frame_color = base0E;
|
|
};
|
|
|
|
urgency_critical = {
|
|
background = base01 + dunstOpacity;
|
|
foreground = base05;
|
|
frame_color = base08;
|
|
};
|
|
};
|
|
};
|
|
}
|