diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-01-09 23:23:26 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-01-09 23:23:26 +0100 |
| commit | 5f91a2184ea9058fcd1e06866798713301763941 (patch) | |
| tree | 735592529aec1dd1a0f57079b29048cb2930bf01 /roles | |
| parent | b13c40b30325c352d235ea31219271de506ff369 (diff) | |
Add hypridle configuration for hyprland
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/hyprland/tasks/main.yml | 3 | ||||
| -rw-r--r-- | roles/hyprland/templates/hyprland/autostart.conf.j2 | 1 | ||||
| -rw-r--r-- | roles/hyprland/templates/hyprland/hypridle.conf.j2 | 24 |
3 files changed, 28 insertions, 0 deletions
diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml index 074fc1c0..16cab027 100644 --- a/roles/hyprland/tasks/main.yml +++ b/roles/hyprland/tasks/main.yml @@ -7,6 +7,7 @@ loop: - "swaybg" - "hyprlock" + - "hypridle" - "hyprland" - name: "Configure greetd" @@ -57,5 +58,7 @@ dest: "/etc/hypr/rules.conf" - src: "hyprland/hyprlock.conf.j2" dest: "/etc/hypr/hyprlock.conf" + - src: "hyprland/hypridle.conf.j2" + dest: "/etc/hypr/hypridle.conf" - src: "hyprland/hyprland.conf.j2" dest: "/etc/hypr/hyprland.conf" diff --git a/roles/hyprland/templates/hyprland/autostart.conf.j2 b/roles/hyprland/templates/hyprland/autostart.conf.j2 index 45651e4f..12a7e4db 100644 --- a/roles/hyprland/templates/hyprland/autostart.conf.j2 +++ b/roles/hyprland/templates/hyprland/autostart.conf.j2 @@ -1,3 +1,4 @@ +exec-once = uwsm-app -- hypridle exec-once = uwsm-app -- mako exec-once = uwsm-app -- waybar exec-once = uwsm-app -- swaybg -i ~/.config/themes/current/background -m fill diff --git a/roles/hyprland/templates/hyprland/hypridle.conf.j2 b/roles/hyprland/templates/hyprland/hypridle.conf.j2 new file mode 100644 index 00000000..ec45757a --- /dev/null +++ b/roles/hyprland/templates/hyprland/hypridle.conf.j2 @@ -0,0 +1,24 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session # lock before suspend + after_sleep_cmd = hyprctl dispatch dpms on +} + +# Lock the screen (after 5 minutes) +listener { + timeout = 300 + on-timeout = loginctl lock-session +} + +# Turn off screen (after 10 minutes) +listener { + timeout = 600 + on-timeout = hyprctl dispatch dpms off + on-resume = hyprctl dispatch dpms on +} + +# Suspend the system (after 15 minutes) +listener { + timeout = 900 + on-timeout = systemctl suspend +} |
