hypr: add owlry power menu with hyprshutdown integration

Replace direct uwsm stop keybind with owlry-power-menu script.
Menu offers lock/suspend/logout/reboot/shutdown via hyprshutdown
for graceful session teardown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 17:17:48 +01:00
parent 06f567cb49
commit f2617605db
2 changed files with 20 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ $notclose = uwsm app -- swaync-client --close-latest
$notcloseall = uwsm app -- swaync-client --close-all
$lockcmd = swaylock -f
$powermenu = owlry-power-menu
##############################################
################## KEYBINDS ##################
@@ -74,8 +75,7 @@ bind = $mainMod CTRL, Grave, exec, $nothide
# Session
bind = $mainMod, Pause, exec, $lockcmd
bind = $mainMod SHIFT, Pause, exec, uwsm stop
bind = $mainMod SHIFT, Escape, exec, $lockcmd
bind = $mainMod SHIFT, Pause, exec, $powermenu
# Window management
bind = $mainMod, Q, killactive,

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
choice=$(printf '%s\n' \
"lock" \
"suspend" \
"logout" \
"reboot" \
"shutdown" \
| owlry -m dmenu -p "Power")
case "$choice" in
lock) swaylock -f ;;
suspend) systemctl suspend ;;
logout) hyprshutdown ;;
reboot) hyprshutdown -t 'Restarting...' --post-cmd 'reboot' ;;
shutdown) hyprshutdown -t 'Shutting down...' --post-cmd 'shutdown -P now' ;;
esac