From 455943ef3df96395cda7a751d7d3498075821e60 Mon Sep 17 00:00:00 2001 From: Jeena Date: Fri, 12 Sep 2025 22:23:07 +0900 Subject: [PATCH] Declutter and comment hypridle.conf --- hypr/hypridle.conf | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index c8d0354..857b620 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,29 +1,52 @@ - general { - lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. - before_sleep_cmd = ~/.config/hypr/scripts/lock.sh # lock before suspend. - after_sleep_cmd = hyprctl dispatch dpms on # turn screen on after wake. +general { + # Define the lock command for hypridle + # This is used whenever hypridle or listeners need to lock the screen + lock_cmd = pidof hyprlock || hyprlock + + # Runs before system suspend (safety net if you manually suspend) + # On a desktop, you can remove this if you never suspend manually + before_sleep_cmd = ~/.config/hypr/scripts/lock.sh + + # Restore screen after sleep + after_sleep_cmd = hyprctl dispatch dpms on } -# Dimming the monitor using ddcutil (DDC/CI brightness) +# Step 1: Dim monitor at 2.5 min idle (warning that it will lock soon) listener { - timeout = 150 # 2.5min - on-timeout = dim && ~/.config/hypr/scripts/lock.sh # dim monitor (safe for OLED) + timeout = 150 + # Only dims the screen, does not lock yet + # This shows you that lock will happen soon + on-timeout = dim } -# Lock screen at 5 minutes +# Step 2: Lock screen at 5 min idle listener { timeout = 300 on-timeout = ~/.config/hypr/scripts/lock.sh } -# Turn screen off at 5.5 minutes +# Step 3: Turn screen off at 5.5 min idle listener { timeout = 330 on-timeout = hyprctl dispatch dpms off && ddcutil setvcp 10 0 + + # Explanation: + # - hyprctl dispatch dpms off → tells the compositor to power off the display (DPMS standby) + # - ddcutil setvcp 10 0 → sets monitor brightness to 0 at the hardware level (safe for OLED) + # + # Both together ensure the screen is fully off visually and electrically + + # When the user becomes active again, restore display on-resume = hyprctl dispatch dpms on && ddcutil setvcp 10 100 + + # Explanation: + # - hyprctl dispatch dpms on → ensures the display is powered on by the compositor + # - ddcutil setvcp 10 100 → restores monitor brightness to full + # + # Both together guarantee the screen wakes reliably on all monitors } -# Suspend after 30 minutes +# Step 4: Suspend system after 30 min idle listener { timeout = 1800 on-timeout = systemctl suspend