{pkgs, lib, super-config, ...}: { services.hyprpolkitagent.enable = true; programs.hyprlock = { enable = true; settings = { background = { monitor = ""; path = "~/.local/share/wallpapers/current_lock"; blur_passes = 2; contrast = 1; brightness = 0.5; vibrancy = 0.2; vibrancy_darkness = 0.2; }; general = { no_fade_in = true; no_fade_out = true; hide_cursor = false; grace = 2; enable_fingerprint = true; disable_loading_bar = true; }; input-field = { monitor = ""; size = "250, 60"; outline_thickness = 2; dots_size = 0.2; dots_spacing = 0.35; dots_center = true; outer_color = "rgba(0, 0, 0, 0)"; inner_color = "rgba(0, 0, 0, 0.2)"; font_color = "$foreground"; fade_on_empty = false; rounding = -1; check_color = "rgb(204, 136, 34)"; placeholder_text = "Input Password..."; hide_input = false; position = "0, -200"; halign = "center"; valign = "center"; }; label = [ # DATE { monitor = ""; text = ''cmd[update:1000] echo "''$(${pkgs.coreutils}/bin/date +"%A, %B %d")"''; color = "rgba(242, 243, 244, 0.75)"; font_size = 22; font_family = "JetBrains Mono"; position = "0, 300"; halign = "center"; valign = "center"; } # TIME { monitor = ""; text = ''cmd[update:1000] echo "''$(${pkgs.coreutils}/bin/date +"%-I:%M")"''; color = "rgba(242, 243, 244, 0.75)"; font_size = 95; font_family = "JetBrains Mono Extrabold"; position = "0, 200"; halign = "center"; valign = "center"; } ]; }; }; services.hypridle = lib.optionals (super-config.enableHypridle == true) { enable = true; settings = let idle_timeout = "300"; # 5 minutes screen_timeout = "600"; # 10 minutes suspend_timeout = "900"; # 10 minutes lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; suspend_cmd = "systemctl suspend"; in{ general = { inherit lock_cmd; before_sleep_cmd = "loginctl lock-session"; }; listener = [ { timeout = idle_timeout; on-timeout = "loginctl lock-session"; } { timeout = screen_timeout; on-timeout = "{pkgs.sway}/bin/swaymsg 'output * dpms off'"; on-resume = "{pkgs.sway}/bin/swaymsg 'output * dpms on'"; } { timeout = suspend_timeout; on-timeout = suspend_cmd; } ]; }; }; home.packages = with pkgs; [ hyprlock coreutils ] ++ (lib.optionals (super-config.enableHypridle == true) [ hypridle ]); # xdg.configFile."hypr/hyprlock.conf" = { # source = "${pkgs.dotfiles}/.config/hypr/hyprlock.conf"; # }; }