diff --git a/dotfiles/config/hypr/hypridle.conf b/dotfiles/config/hypr/hypridle.conf new file mode 100644 index 00000000..54571f9e --- /dev/null +++ b/dotfiles/config/hypr/hypridle.conf @@ -0,0 +1,16 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch dpms on +} + +listener { + timeout = 600 + on-timeout = loginctl lock-session +} + +listener { + timeout = 900 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} diff --git a/dotfiles/config/hypr/hyprland.conf b/dotfiles/config/hypr/hyprland.conf index 9f0cb586..0bd1d8e2 100644 --- a/dotfiles/config/hypr/hyprland.conf +++ b/dotfiles/config/hypr/hyprland.conf @@ -552,6 +552,7 @@ exec-once = systemctl --user start graphical-session.target exec-once = systemctl --user start hyprland-session.target # Force a fresh daemon after compositor restarts so hyprscratch doesn't keep a stale socket. exec-once = systemctl --user restart hyprscratch.service +exec-once = hypridle exec-once = ~/.config/hypr/scripts/workspace-history.sh # Clipboard history daemon diff --git a/dotfiles/config/hypr/hyprlock.conf b/dotfiles/config/hypr/hyprlock.conf new file mode 100644 index 00000000..ae7794c1 --- /dev/null +++ b/dotfiles/config/hypr/hyprlock.conf @@ -0,0 +1,39 @@ +background { + monitor = + path = screenshot + blur_passes = 3 + blur_size = 8 + noise = 0.0117 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 +} + +input-field { + monitor = + size = 280, 56 + outline_thickness = 3 + dots_size = 0.2 + dots_spacing = 0.2 + outer_color = rgb(edb443) + inner_color = rgb(1e1e2e) + font_color = rgb(cdd6f4) + fade_on_empty = false + rounding = 12 + placeholder_text = Password... + hide_input = false + position = 0, -80 + halign = center + valign = center +} + +label { + monitor = + text = cmd[update:1000] echo "$(date +'%a %b %-d %I:%M %p')" + color = rgb(cdd6f4) + font_size = 40 + font_family = Noto Sans + position = 0, 80 + halign = center + valign = center +} diff --git a/nixos/hyprland.nix b/nixos/hyprland.nix index 2efc1c47..39904574 100644 --- a/nixos/hyprland.nix +++ b/nixos/hyprland.nix @@ -11,6 +11,9 @@ in makeEnable config "myModules.hyprland" true { myModules.taffybar.enable = true; + # Needed for hyprlock authentication without PAM fallback warnings. + security.pam.services.hyprlock = {}; + programs.hyprland = { enable = true; # Use Hyprland from the flake for proper plugin compatibility