niksos/modules/gui/hypr/lock.nix

93 lines
2.8 KiB
Nix
Raw Normal View History

2024-03-19 23:45:26 +01:00
{
config,
inputs,
lib,
pkgs,
...
}: with lib; let
cfg = config.myOptions.programs.hypr.lock;
2024-04-14 18:49:29 +02:00
inherit (config.myOptions.other.system) username;
2024-03-19 23:45:26 +01:00
text_color = "rgba(eae0e4FF)";
in {
options.myOptions.programs.hypr.lock = {
2024-04-05 22:59:32 +02:00
enable = mkEnableOption "hiper zamek";
2024-03-19 23:45:26 +01:00
extraSettings = mkOption {
type = types.attrs;
description = "extra per host hyprlock settings";
default = {};
};
};
config = mkIf cfg.enable {
home-manager.users.${username} = {
imports = [ inputs.hyprlock.homeManagerModules.default ];
programs.hyprlock = {
enable = true;
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
general = {
grace = 2;
};
backgrounds = [
{
color = "rgba(120f1177)";
path = "screenshot";
blur_size = 5;
blur_passes = 4;
}
];
input-fields = [
{
size = {
width = 600;
height = 50;
};
outline_thickness = 3;
dots_size = 0.1;
dots_spacing = 0.3;
outer_color = "rgba(9a8d9555)";
inner_color = "rgba(120f1111)";
font_color = "rgba(d1c2cbff)";
fade_on_empty = true;
position = {
x = 0;
y = 20;
};
halign = "center";
valign = "center";
}
];
labels = [
{
# clock
text = "$TIME";
color = text_color;
font_size = 65;
position = {
x = 0;
y = 300;
};
halign = "center";
valign = "center";
}
{
2024-04-01 17:50:18 +02:00
# battery
text = "cmd[update:1000] echo \"$(cat /sys/class/power_supply/BAT0/capacity)%\"";
2024-03-19 23:45:26 +01:00
color = text_color;
2024-04-01 17:50:18 +02:00
font_size = 30;
2024-03-19 23:45:26 +01:00
position = {
x = 0;
2024-04-01 17:50:18 +02:00
y = 200;
2024-03-19 23:45:26 +01:00
};
halign = "center";
valign = "center";
}
];
};
};
};
}