Files
neoromantique-dotfiles/home/private_dot_config/hypr/hypridle.conf.tmpl
David Aizenberg b309851423 sync
2025-12-09 13:23:23 +01:00

31 lines
754 B
Cheetah

# Hypridle Configuration
# Device: {{ .deviceProfile }} ({{ .hostname }})
# Idle timeout: {{ .idleTimeout }} seconds
general {
lock_cmd = hyprctl switchxkblayout all 0; pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = {{ .idleTimeout }}
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
{{- if .hasBattery }}
# Laptop: dim screen before turning off
listener {
timeout = {{ sub .idleTimeout 60 }}
on-timeout = brightnessctl -s set 30%
on-resume = brightnessctl -r
}
# Laptop: suspend after extended idle
listener {
timeout = {{ mul .idleTimeout 2 }}
on-timeout = systemctl suspend
}
{{- end }}