diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf new file mode 100644 index 0000000..66fa4e9 --- /dev/null +++ b/config/hypr/hypridle.conf @@ -0,0 +1,67 @@ +# Configuring hypridle +# See: https://wiki.hypr.land/Hypr-Ecosystem/hypridle/ +# +# hypridle.conf - Hypridle configuration for HyDE +# Handles idle actions: dim, lock, DPMS, suspend, and custom listeners +# +# Listeners: Each listener block defines an idle timeout and actions to run +# +# For more info, see: https://wiki.hypr.land/Hypr-Ecosystem/hypridle/ + +#!   ░▒▒▒░░░▓▓          ___________ +#! ░░▒▒▒░░░░░▓▓        //___________/ +#! ░░▒▒▒░░░░░▓▓     _   _ _    _ _____ +#! ░░▒▒░░░░░▓▓▓▓▓ | | | | |  | |  __/ +#! ░▒▒░░░░▓▓   ▓▓ | |_| | |_/ /| |___ +#!  ░▒▒░░▓▓   ▓▓   \__  |____/ |____/ +#!    ░▒▓▓   ▓▓  //____/ + +$LOCK_CMD = hyde-shell lockscreen.sh # Calls $LOCKSCREEN default is hyprlock +$UNLOCK_CMD = sh -c 'sleep 3 && pkill -9 $(hyde-shell lockscreen --get)' # kills the lockscreen after 3 seconds for cleanup + +general { + lock_cmd = $LOCK_CMD # command when `loginctl lock-session` is called + unlock_cmd = $UNLOCK_CMD # command when `loginctl unlock-session` is called + ignore_dbus_inhibit = false # Ignore dbus idle-inhibit requests (false = respect them) + ignore_systemd_inhibit = false # Ignore systemd-inhibit --what=idle (false = respect them) + # before_sleep_cmd = # command ran before sleep + # after_sleep_cmd = # notify-send "Awake!" # command ran after sleep +} + +# // --- Listener: Dim display after 60s idle --- +listener { + timeout = 60 + on-timeout = brightnessctl -s && brightnessctl s 1% # Save and set brightness to 1% + on-resume = brightnessctl -r # Restore brightness on activity +} + +# // --- Listener: Lock after 120s idle --- +# Locks the session before DPMS off, so the screen is not visible after wake +listener { + timeout = 120 + on-timeout = loginctl lock-session # Try system lock, fallback to $LOCKSCREEN +} + +# // --- Listener: DPMS off after 300s idle --- +# Turns off display (but not if media is playing) +# DISABLED: dpms-off while hyprlock is active crashes hyprlock/Hyprland +# (https://github.com/hyprwm/hyprlock/issues/984). Monitor hardware +# powersaving still turns the display off safely on its own. +#listener { +# timeout = 300 +# on-timeout = hyprctl dispatch dpms off # Turn off display +# on-resume = hyprctl dispatch dpms on # Turn display back on +#} + +# // --- Listener: Suspend after 500s idle --- +listener { + timeout = 500 + on-timeout = systemctl suspend # Suspend system +} + +# // --- Custom listeners --- +# hyprlang noerror true +# Source any additional listener configs from this path (wildcard supported) +# Note: 'source' command is not implemented yet in hyprlang, but left for future use +source = ./hypridle/* +# hyprlang noerror false