hyprlock: moved to nix expressions

This commit is contained in:
Tigor Hutasuhut 2024-10-20 10:39:14 +07:00
parent 6da1e37b3a
commit 0bfdafe9d9

View file

@ -4,96 +4,85 @@ let
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home.packages = [ programs.hyprlock = {
pkgs.hyprlock enable = true;
]; settings = {
general = {
home.file.".config/hypr/hyprlock.conf".text = ignore_empty_input = true;
let };
blurred_image = "${config.home.homeDirectory}/.cache/wallpaper/blurred.png"; background = {
profilePicture = "${config.home.homeDirectory}/.cache/wallpaper/square.png"; monitor = "";
in path = "${config.home.homeDirectory}/.cache/wallpaper/blurred.png";
/*hyprlang*/ };
'' input-field = {
general { monitor = "";
ignore_empty_input = true size = "200, 50";
} outline_thickness = 3;
dots_size = 0.33;
background { dots_spacing = 0.15;
monitor = dots_center = true;
path = ${blurred_image} dots_rounding = -1;
} outer_color = "rgb(151515)";
inner_color = "rgb(FFFFFF)";
input-field { font_color = "rgb(10, 10, 10)";
monitor = fade_on_empty = false;
size = 200, 50 fade_timeout = 1000;
outline_thickness = 3 placeholder_text = "<i>Input Password...</i>";
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 hide_input = false;
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 rounding = -1;
dots_center = true check_color = "rgb(204, 136, 34)";
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding fail_color = "rgb(204, 34, 34)";
outer_color = rgb(151515) fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
inner_color = rgb(FFFFFF) fail_transition = 300;
font_color = rgb(10, 10, 10) capslock_color = -1;
fade_on_empty = false numlock_color = -1;
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. bothlock_color = -1;
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty. invert_numlock = false;
hide_input = false swap_font_color = false;
rounding = -1 # -1 means complete rounding (circle/oval) position = "0, -20";
check_color = rgb(204, 136, 34) halign = "center";
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color valign = "center";
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty };
fail_transition = 300 # transition time in ms between normal outer_color and fail_color label = [
capslock_color = -1 {
numlock_color = -1 monitor = "";
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) text = "cmd[update:1000] echo \"$TIME\"";
invert_numlock = false # change color if numlock is off color = "rgba(200, 200, 200, 1.0)";
swap_font_color = false # see below font_size = 55;
position = 0, -20 font_family = "Fira Semibold";
halign = center position = "-100, 75";
valign = center halign = "right";
} valign = "bottom";
shadow_passes = 5;
label { shadow_size = 10;
monitor = }
text = cmd[update:1000] echo "$TIME" {
color = rgba(200, 200, 200, 1.0) monitor = "";
font_size = 55 text = "${config.profile.user.fullName}";
font_family = Fira Semibold color = "rgba(200, 200, 200, 1.0)";
position = -100, 75 font_size = 20;
halign = right font_family = "Fira Semibold";
valign = bottom position = "-100, 160";
shadow_passes = 5 halign = "right";
shadow_size = 10 valign = "bottom";
} shadow_passes = 5;
shadow_size = 10;
label { }
monitor = ];
text = ${config.profile.user.fullName} image = {
color = rgba(200, 200, 200, 1.0) monitor = "";
font_size = 20 path = "${config.home.homeDirectory}/.cache/wallpaper/square.png";
font_family = Fira Semibold size = 280;
position = -100, 160 rounding = -1;
halign = right border_size = 4;
valign = bottom border_color = "rgb(221, 221, 221)";
shadow_passes = 5 rotate = 0;
shadow_size = 10 reload_time = -1;
} position = "0, 200";
halign = "center";
image { valign = "center";
monitor = };
path = ${profilePicture} };
size = 280 # lesser side if not 1:1 ratio };
rounding = -1 # negative values mean circle
border_size = 4
border_color = rgb(221, 221, 221)
rotate = 0 # degrees, counter-clockwise
reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2
# reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F
position = 0, 200
halign = center
valign = center
}
'';
}; };
} }