{ lib, config, ... }: {
config = lib.mkIf (config.desktop.enable && !config.desktop.noctalia.enable) {
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
before_sleep_cmd = "loginctl lock-session";
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "hyprlock";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
programs.hyprlock = {
enable = true;
settings = {
"$accent" = "$mauve";
"$accentAlpha" = "$mauveAlpha";
"$font" = config.fonts.mono;
# GENERAL
general = {
disable_loading_bar = true;
hide_cursor = true;
};
background = {
monitor = "";
path = "${config.desktop.wallpaper.image}";
blur_passes = 0;
color = "$base";
};
# LAYOUT
label = [
{
monitor = "";
text = "Layout: $LAYOUT";
color = "$text";
font_size = 25;
font_family = "$font";
position = "30, -30";
halign = "left";
valign = "top";
}
{
monitor = "";
text = "$TIME";
color = "$text";
font_size = 90;
font_family = "$font";
position = "-30, 0";
halign = "right";
valign = "top";
}
{
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
color = "$text";
font_size = 25;
font_family = "$font";
position = "-30, -150";
halign = "right";
valign = "top";
}
];
# INPUT FIELD
input-field = {
monitor = "";
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "$accent";
inner_color = "$surface0";
font_color = "$text";
fade_on_empty = false;
placeholder_text = '' Logged in as $USER'';
hide_input = false;
check_color = "$accent";
fail_color = "$red";
fail_text = "$FAIL ($ATTEMPTS)";
capslock_color = "$yellow";
position = "0, -47";
halign = "center";
valign = "center";
};
};
};
};
}