096ac3f76a
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>
19 lines
464 B
Bash
Executable File
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
|