summaryrefslogtreecommitdiffstats
path: root/roles/hyprland
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-02-22 23:00:31 +0100
committerAhmed Abdelhalim <[email protected]>2026-02-22 23:33:26 +0100
commit6c7ecc514acbab6b4ef2ef55239068a24077f21b (patch)
tree82e073c2bf56c7eb8c29f2f1c2ee05ef44ff47d6 /roles/hyprland
parent23d67bbb70291bf3046c57c6768dc1727b1077b2 (diff)
Add hyprshutdown and configure hyprlock to use it
Diffstat (limited to 'roles/hyprland')
-rw-r--r--roles/hyprland/meta/main.yml1
-rw-r--r--roles/hyprland/templates/hyprlock.conf.j26
2 files changed, 4 insertions, 3 deletions
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml
index a657398b..bc3c0c79 100644
--- a/roles/hyprland/meta/main.yml
+++ b/roles/hyprland/meta/main.yml
@@ -18,6 +18,7 @@ dependencies:
- role: "tofi"
- role: "hyprcursor"
- role: "hyprtheme"
+ - role: "hyprshutdown"
galaxy_info:
author: "a14m"
description: "Install hyprland"
diff --git a/roles/hyprland/templates/hyprlock.conf.j2 b/roles/hyprland/templates/hyprlock.conf.j2
index f2da8ec3..22fb5f20 100644
--- a/roles/hyprland/templates/hyprlock.conf.j2
+++ b/roles/hyprland/templates/hyprlock.conf.j2
@@ -112,7 +112,7 @@ label {
font_family = $font
color = $font_color
- onclick = reboot
+ onclick = hyprctl dispatch exec hyprshutdown --no-fork -t "Restarting..." --post-cmd "systemctl reboot"
halign = center
valign = center
@@ -127,7 +127,7 @@ label {
font_family = $font
color = $font_color
- onclick = shutdown now
+ onclick = hyprctl dispatch exec hyprshutdown --no-fork -t "Shutting down..." --post-cmd "systemctl poweroff"
halign = center
valign = center
@@ -142,7 +142,7 @@ label {
font_family = $font
color = $font_color
- onclick = systemctl suspend
+ onclick = loginctl lock-session && systemctl suspend
halign = center
valign = center