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:
@@ -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,
|
||||
|
||||
18
dot_local/bin/executable_owlry-power-menu
Normal file
18
dot_local/bin/executable_owlry-power-menu
Normal 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
|
||||
Reference in New Issue
Block a user