Skip to content

Commit

Permalink
Nix: add blur settings and no_fade_in
Browse files Browse the repository at this point in the history
  • Loading branch information
jechton authored and fufexan committed Feb 22, 2024
1 parent 272fc35 commit f411d9d
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions nix/hm-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ in {
type = bool;
default = true;
};
no_fade_in = mkOption {
description = "Do not fade in";
type = bool;
default = false;
};
};

backgrounds = mkOption {
Expand All @@ -60,6 +65,48 @@ in {
type = str;
default = "rgba(25, 20, 20, 1.0)";
};

blur_size = mkOption {
description = "Blur size";
type = int;
default = 8;
};

blur_passes = mkOption {
description = "Blur passes";
type = int;
default = 0;
};

noise = mkOption {
description = "Noise applied to blur";
type = float;
default = 0.0117;
};

contrast = mkOption {
description = "Contrast applied to blur";
type = float;
default = 0.8917;
};

brightness = mkOption {
description = "Brightness applied to blur";
type = float;
default = 0.8172;
};

vibrancy = mkOption {
description = "Vibrancy applied to blur";
type = float;
default = 0.1686;
};

vibrancy_darkness = mkOption {
description = "Vibrancy darkness applied to blur";
type = float;
default = 0.05;
};
};
});
default = [
Expand Down Expand Up @@ -256,13 +303,21 @@ in {
disable_loading_bar = ${boolToString cfg.general.disable_loading_bar}
grace = ${toString cfg.general.grace}
hide_cursor = ${boolToString cfg.general.hide_cursor}
no_fade_in = ${boolToString cfg.general.no_fade_in}
}
${builtins.concatStringsSep "\n" (map (background: ''
background {
monitor = ${background.monitor}
path = ${background.path}
color = ${background.color}
blur_size = ${toString background.blur_size}
blur_passes = ${toString background.blur_passes}
noise = ${toString background.noise}
contrast = ${toString background.contrast}
brightness = ${toString background.brightness}
vibrancy = ${toString background.vibrancy}
vibrancy_darkness = ${toString background.vibrancy_darkness}
}
'')
cfg.backgrounds)}
Expand Down

0 comments on commit f411d9d

Please sign in to comment.