mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
Nix/HM module: add shadow options (#141)
This commit is contained in:
parent
5eaa7c0834
commit
cb08f60254
1 changed files with 259 additions and 218 deletions
|
@ -14,6 +14,29 @@ self: {
|
|||
then "true"
|
||||
else "false";
|
||||
cfg = config.programs.hyprlock;
|
||||
|
||||
shadow = {
|
||||
shadow_passes = mkOption {
|
||||
description = "Shadow passes";
|
||||
type = int;
|
||||
default = 0;
|
||||
};
|
||||
shadow_size = mkOption {
|
||||
description = "Shadow size";
|
||||
type = int;
|
||||
default = 3;
|
||||
};
|
||||
shadow_color = mkOption {
|
||||
description = "Shadow color";
|
||||
type = str;
|
||||
default = "rgba(0, 0, 0, 1.0)";
|
||||
};
|
||||
shadow_boost = mkOption {
|
||||
description = "Boost shadow's opacity";
|
||||
type = float;
|
||||
default = 1.2;
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.programs.hyprlock = {
|
||||
enable =
|
||||
|
@ -67,7 +90,8 @@ in {
|
|||
backgrounds = mkOption {
|
||||
description = "Background configurations";
|
||||
type = listOf (submodule {
|
||||
options = {
|
||||
options =
|
||||
{
|
||||
monitor = mkOption {
|
||||
description = "The monitor to apply the given wallpaper to";
|
||||
type = str;
|
||||
|
@ -127,7 +151,8 @@ in {
|
|||
type = float;
|
||||
default = 0.05;
|
||||
};
|
||||
};
|
||||
}
|
||||
// shadow;
|
||||
});
|
||||
default = [
|
||||
{}
|
||||
|
@ -137,7 +162,8 @@ in {
|
|||
input-fields = mkOption {
|
||||
description = "Input field configurations";
|
||||
type = listOf (submodule {
|
||||
options = {
|
||||
options =
|
||||
{
|
||||
monitor = mkOption {
|
||||
description = "The monitor to place the input field on";
|
||||
type = str;
|
||||
|
@ -259,7 +285,8 @@ in {
|
|||
type = str;
|
||||
default = "center";
|
||||
};
|
||||
};
|
||||
}
|
||||
// shadow;
|
||||
});
|
||||
default = [
|
||||
{}
|
||||
|
@ -269,7 +296,8 @@ in {
|
|||
labels = mkOption {
|
||||
description = "Label configurations";
|
||||
type = listOf (submodule {
|
||||
options = {
|
||||
options =
|
||||
{
|
||||
monitor = mkOption {
|
||||
description = "The monitor to display the label on";
|
||||
type = str;
|
||||
|
@ -325,7 +353,8 @@ in {
|
|||
type = str;
|
||||
default = "center";
|
||||
};
|
||||
};
|
||||
}
|
||||
// shadow;
|
||||
});
|
||||
default = [
|
||||
{}
|
||||
|
@ -356,6 +385,10 @@ in {
|
|||
brightness = ${toString background.brightness}
|
||||
vibrancy = ${toString background.vibrancy}
|
||||
vibrancy_darkness = ${toString background.vibrancy_darkness}
|
||||
shadow_passes = ${toString background.shadow_passes}
|
||||
shadow_size = ${toString background.shadow_size}
|
||||
shadow_color = ${background.shadow_color}
|
||||
shadow_boost = ${toString background.shadow_boost}
|
||||
}
|
||||
'')
|
||||
cfg.backgrounds)}
|
||||
|
@ -377,6 +410,10 @@ in {
|
|||
placeholder_text = ${input-field.placeholder_text}
|
||||
hide_input = ${boolToString input-field.hide_input}
|
||||
rounding = ${toString input-field.rounding}
|
||||
shadow_passes = ${toString input-field.shadow_passes}
|
||||
shadow_size = ${toString input-field.shadow_size}
|
||||
shadow_color = ${input-field.shadow_color}
|
||||
shadow_boost = ${toString input-field.shadow_boost}
|
||||
|
||||
position = ${toString input-field.position.x}, ${toString input-field.position.y}
|
||||
halign = ${input-field.halign}
|
||||
|
@ -392,6 +429,10 @@ in {
|
|||
color = ${label.color}
|
||||
font_size = ${toString label.font_size}
|
||||
font_family = ${label.font_family}
|
||||
shadow_passes = ${toString label.shadow_passes}
|
||||
shadow_size = ${toString label.shadow_size}
|
||||
shadow_color = ${label.shadow_color}
|
||||
shadow_boost = ${toString label.shadow_boost}
|
||||
|
||||
position = ${toString label.position.x}, ${toString label.position.y}
|
||||
halign = ${label.halign}
|
||||
|
|
Loading…
Reference in a new issue