Configuration is managed through a file located at ~/.config/hypr/hypridle.conf using standard hyprlang syntax. The configuration is divided into general settings and multiple listener blocks.
General Settings
The general block defines commands for session state changes and how to handle inhibitors:
lock_cmd: Command to run for locking the session (e.g., loginctl lock-session).unlock_cmd: Command to run when the session is unlocked.before_sleep_cmd: Command to run before the system enters sleep.after_sleep_cmd: Command to run after the system wakes from sleep.ignore_dbus_inhibit: If true, hypridle will ignore idle-inhibit requests sent via DBus (e.g., from Firefox or Steam).ignore_systemd_inhibit: If true, hypridle will ignore systemd-inhibit --what=idle inhibitors.
Listeners
You can define multiple listener blocks to trigger actions based on idle time. If on-timeout or on-resume are omitted or empty, those specific events are ignored.
timeout: Time in seconds before the idle event triggers.on-timeout: Command to run when the timeout is reached.on-resume: Command to run when activity is detected after a timeout has fired.condition_cmd: An optional command to run before on-timeout. If it exits with 0, the timeout proceeds; if non-zero, the timeout is deferred.condition_retry: The interval in seconds to retry the condition_cmd when it defers (defaults to 0, meaning no retry).
general {
lock_cmd = notify-send "lock!"
unlock_cmd = notify-send "unlock!"
before_sleep_cmd = notify-send "Zzz"
after_sleep_cmd = notify-send "Awake!"
ignore_dbus_inhibit = false
ignore_systemd_inhibit = false
}
listener {
timeout = 500
on-timeout = notify-send "You are idle!"
on-resume = notify-send "Welcome back!"
condition_cmd =
condition_retry = 0
}