|
| 1 | +# Configuring hypridle |
| 2 | +# See: https://wiki.hypr.land/Hypr-Ecosystem/hypridle/ |
| 3 | +# |
| 4 | +# hypridle.conf - Hypridle configuration for HyDE |
| 5 | +# Handles idle actions: dim, lock, DPMS, suspend, and custom listeners |
| 6 | +# |
| 7 | +# $LOCKSCREEN: Command to lock the screen (set to your preferred lockscreen) |
| 8 | +# |
| 9 | +# Listeners: Each listener block defines an idle timeout and actions to run |
| 10 | +# |
| 11 | +# For more info, see: https://wiki.hypr.land/Hypr-Ecosystem/hypridle/ |
| 12 | + |
1 | 13 | #! ░▒▒▒░░░▓▓ ___________ |
2 | 14 | #! ░░▒▒▒░░░░░▓▓ //___________/ |
3 | 15 | #! ░░▒▒▒░░░░░▓▓ _ _ _ _ _____ |
4 | | -#! ░░▒▒░░░░░▓▓▓▓▓▓ | | | | | | | __/ |
| 16 | +#! ░░▒▒░░░░░▓▓▓▓▓ | | | | | | | __/ |
5 | 17 | #! ░▒▒░░░░▓▓ ▓▓ | |_| | |_/ /| |___ |
6 | 18 | #! ░▒▒░░▓▓ ▓▓ \__ |____/ |____/ |
7 | 19 | #! ░▒▓▓ ▓▓ //____/ |
8 | 20 |
|
9 | 21 | # $LOCKSCREEN = hyprlock # preferred LOCKSCREEN e.g swaylock |
10 | | -$LOCKSCREEN = lockscreen.sh # Calls $LOCKSCREEN set from hyprland |
| 22 | +$LOCKSCREEN = hyde-shell lockscreen # Calls $LOCKSCREEN |
11 | 23 |
|
| 24 | +# // --- General hypridle settings --- |
12 | 25 | general { |
13 | | - lock_cmd = $LOCKSCREEN |
14 | | - unlock_cmd = #notify-send "unlock!" # same as above, but unlock |
15 | | - before_sleep_cmd = $LOCKSCREEN # command ran before sleep |
16 | | - after_sleep_cmd = # notify-send "Awake!" # command ran after sleep |
17 | | - ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) |
18 | | - ignore_systemd_inhibit = false # whether to ignore systemd-inhibit --what=idle inhibitors |
| 26 | + lock_cmd = $LOCKSCREEN # Registers the lockscreen command to dbus so it can be invoked by `loginctl lock-session` |
| 27 | + # unlock_cmd = #notify-send "unlock!" # Command to run on unlock (optional) |
| 28 | + before_sleep_cmd = loginctl lock-session # Locks before sleep |
| 29 | + # after_sleep_cmd = # notify-send "Awake!" # Command after waking up (optional) |
| 30 | + ignore_dbus_inhibit = false # Ignore dbus idle-inhibit requests (false = respect them) |
| 31 | + ignore_systemd_inhibit = false # Ignore systemd-inhibit --what=idle (false = respect them) |
19 | 32 | } |
20 | 33 |
|
21 | | -# Dims the display |
| 34 | +# // --- Listener: Dim display after 60s idle --- |
22 | 35 | listener { |
23 | 36 | timeout = 60 |
24 | | -on-timeout = { brightnessctl -s && brightnessctl s 1% ;} |
25 | | - on-resume = brightnessctl -r |
| 37 | + on-timeout = { brightnessctl -s && brightnessctl s 1% ;} # Save and set brightness to 1% |
| 38 | + on-resume = brightnessctl -r # Restore brightness on activity |
26 | 39 | } |
27 | 40 |
|
28 | | -# Lock it first before dpms off so that screen won't show for a moment after wake up. |
| 41 | +# // --- Listener: Lock after 120s idle --- |
| 42 | +# Locks the session before DPMS off, so the screen is not visible after wake |
29 | 43 | listener { |
30 | 44 | timeout = 120 |
31 | | - on-timeout = $LOCKSCREEN |
| 45 | + on-timeout = loginctl lock-session # Try system lock, fallback to $LOCKSCREEN |
32 | 46 | } |
33 | 47 |
|
34 | | -# DPMS off |
| 48 | +# // --- Listener: DPMS off after 300s idle --- |
| 49 | +# Turns off display (but not if media is playing) |
35 | 50 | listener { |
36 | 51 | timeout = 300 |
37 | | - on-timeout = hyprctl dispatch dpms off #do not turn off display while media is playing |
38 | | - on-resume = hyprctl dispatch dpms on |
| 52 | + on-timeout = hyprctl dispatch dpms off # Turn off display |
| 53 | + on-resume = hyprctl dispatch dpms on # Turn display back on |
39 | 54 | } |
40 | 55 |
|
41 | | -# Suspend |
| 56 | +# // --- Listener: Suspend after 500s idle --- |
42 | 57 | listener { |
43 | 58 | timeout = 500 |
44 | | - on-timeout = systemctl suspend |
| 59 | + on-timeout = systemctl suspend # Suspend system |
45 | 60 | } |
46 | 61 |
|
| 62 | +# // --- Custom listeners --- |
47 | 63 | # hyprlang noerror true |
48 | | -# Source anything from this path if you want to add your own listener |
49 | | -# source command actually do not exist yet |
50 | | -source = ~/.config/hypridle/* |
| 64 | +# Source any additional listener configs from this path (wildcard supported) |
| 65 | +# Note: 'source' command is not implemented yet in hyprlang, but left for future use |
| 66 | +source = ./hypridle/* |
51 | 67 | # hyprlang noerror false |
0 commit comments