mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
Nix: add hide_input to hm module + correctly convert bools to strings + some minor styling changes
This commit is contained in:
parent
d28e009c55
commit
a756d761eb
1 changed files with 24 additions and 8 deletions
|
@ -9,6 +9,7 @@ self: {
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
|
||||||
|
boolToString = x: if x then "true" else "false";
|
||||||
cfg = config.programs.hyprlock;
|
cfg = config.programs.hyprlock;
|
||||||
in {
|
in {
|
||||||
options.programs.hyprlock = {
|
options.programs.hyprlock = {
|
||||||
|
@ -51,10 +52,17 @@ in {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
general.disable_loading_bar =
|
general = {
|
||||||
mkEnableOption ""
|
disable_loading_bar = mkOption {
|
||||||
// {
|
|
||||||
description = "Whether to disable loading bar";
|
description = "Whether to disable loading bar";
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
hide_cursor = mkOption {
|
||||||
|
description = "Hides the cursor instead of making it visible";
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
input_field = {
|
input_field = {
|
||||||
|
@ -113,6 +121,12 @@ in {
|
||||||
default = "<i>Input Password...</i>";
|
default = "<i>Input Password...</i>";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hide_input = mkOption {
|
||||||
|
description = "Hide input typed into the input field";
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
position = {
|
position = {
|
||||||
x = mkOption {
|
x = mkOption {
|
||||||
description = "X position of the label";
|
description = "X position of the label";
|
||||||
|
@ -203,7 +217,8 @@ in {
|
||||||
|
|
||||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||||
general {
|
general {
|
||||||
disable_loading_bar = ${toString cfg.general.disable_loading_bar}
|
disable_loading_bar = ${boolToString cfg.general.disable_loading_bar}
|
||||||
|
hide_cursor = ${boolToString cfg.general.hide_cursor}
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
|
@ -213,22 +228,23 @@ in {
|
||||||
font_size = ${toString cfg.label.font_size}
|
font_size = ${toString cfg.label.font_size}
|
||||||
font_family = ${cfg.label.font_family}
|
font_family = ${cfg.label.font_family}
|
||||||
|
|
||||||
position = ${toString cfg.label.position.x} ${toString cfg.label.position.y}
|
position = ${toString cfg.label.position.x}, ${toString cfg.label.position.y}
|
||||||
halign = ${cfg.label.halign}
|
halign = ${cfg.label.halign}
|
||||||
valign = ${cfg.label.valign}
|
valign = ${cfg.label.valign}
|
||||||
}
|
}
|
||||||
|
|
||||||
input-field {
|
input-field {
|
||||||
monitor = ${cfg.input_field.monitor}
|
monitor = ${cfg.input_field.monitor}
|
||||||
size = ${toString cfg.input_field.size.width} ${toString cfg.input_field.size.height}
|
size = ${toString cfg.input_field.size.width}, ${toString cfg.input_field.size.height}
|
||||||
outline_thickness = ${toString cfg.input_field.outline_thickness}
|
outline_thickness = ${toString cfg.input_field.outline_thickness}
|
||||||
outer_color = ${cfg.input_field.outer_color}
|
outer_color = ${cfg.input_field.outer_color}
|
||||||
inner_color = ${cfg.input_field.inner_color}
|
inner_color = ${cfg.input_field.inner_color}
|
||||||
font_color = ${cfg.input_field.font_color}
|
font_color = ${cfg.input_field.font_color}
|
||||||
fade_on_empty = ${toString cfg.input_field.fade_on_empty}
|
fade_on_empty = ${boolToString cfg.input_field.fade_on_empty}
|
||||||
placeholder-text = ${cfg.input_field.placeholder_text}
|
placeholder-text = ${cfg.input_field.placeholder_text}
|
||||||
|
hide_input = ${boolToString cfg.input_field.hide_input}
|
||||||
|
|
||||||
position = ${toString cfg.input_field.position.x} ${toString cfg.input_field.position.y}
|
position = ${toString cfg.input_field.position.x}, ${toString cfg.input_field.position.y}
|
||||||
halign = ${cfg.input_field.halign}
|
halign = ${cfg.input_field.halign}
|
||||||
valign = ${cfg.input_field.valign}
|
valign = ${cfg.input_field.valign}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue