From f2617605dba10f00c21cc9c752f644ea37c94ac0 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Fri, 13 Mar 2026 17:17:48 +0100 Subject: [PATCH] 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 --- .../hypr/hyprland.d/70-keybinds.conf.tmpl | 4 ++-- dot_local/bin/executable_owlry-power-menu | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 dot_local/bin/executable_owlry-power-menu diff --git a/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl b/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl index 233296c..3931a5c 100644 --- a/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl +++ b/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl @@ -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, diff --git a/dot_local/bin/executable_owlry-power-menu b/dot_local/bin/executable_owlry-power-menu new file mode 100644 index 0000000..97a11ce --- /dev/null +++ b/dot_local/bin/executable_owlry-power-menu @@ -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