Files
funman300 096ac3f76a powermenu: route Sleep through suspend-then-hibernate
Aligns the third sleep path (power menu) with the lid handler and
the swayidle 30-min timer — all three now suspend immediately and
hibernate after HibernateDelaySec (30 min).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 17:30:32 -07:00

19 lines
464 B
Bash
Executable File

#!/bin/bash
CHOICE=$(printf " Logout\n Restart\n Sleep\n Shutdown" \
| wofi --dmenu \
--prompt "Power:" \
--width 300 \
--height 220 \
--hide-scroll \
--no-actions \
--insensitive \
| awk '{print $NF}')
case "$CHOICE" in
Logout) niri msg action quit ;;
Restart) systemctl reboot ;;
Sleep) systemctl suspend-then-hibernate ;;
Shutdown) systemctl poweroff ;;
esac