Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix: add blur settings and no_fade_in #61

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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