d2264408d581fc69b88410e720700c52f5db23be

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Use template for hypridle config

Diff

 1diff --git a/dot_config/hypr/hypridle.conf b/dot_config/hypr/hypridle.conf
 2deleted file mode 100644
 3index 158b104c7655f041c18056c1f8749508695ebc91..0000000000000000000000000000000000000000
 4--- a/dot_config/hypr/hypridle.conf
 5+++ /dev/null
 6@@ -1,5 +0,0 @@
 7-listener {
 8-    timeout = 120
 9-    on-timeout = hyprctl dispatch dpms off
10-    on-resume = hyprctl dispatch dpms on
11-}
12diff --git a/dot_config/hypr/hypridle.conf.tmpl b/dot_config/hypr/hypridle.conf.tmpl
13new file mode 100644
14index 0000000000000000000000000000000000000000..a32b2ee02464a0b652adef502a5367eb6088bc4a
15--- /dev/null
16+++ b/dot_config/hypr/hypridle.conf.tmpl
17@@ -0,0 +1,31 @@
18+# vim: ft=hyprlang
19+
20+listener {
21+    timeout = 120
22+    on-timeout = hyprctl dispatch dpms off
23+    on-resume = hyprctl dispatch dpms on
24+}
25+{{- if index (index .hyprland "hypridle" | default dict) "auto_suspend" | default false }}
26+
27+general {
28+    lock_cmd = pidof hyprlock || hyprlock
29+    before_sleep_cmd = loginctl lock-session
30+    after_sleep_cmd = hyprctl dispatch dpms on
31+}
32+
33+listener {
34+    timeout = 60
35+    on-timeout = light -O && light -S 0
36+    on-resume = light -I
37+}
38+
39+listener {
40+    timeout = 300
41+    on-timeout = loginctl lock-session
42+}
43+
44+listener {
45+    timeout = 320
46+    on-timeout = systemctl suspend
47+}
48+{{- end }}