ArchRice/rofi/powermenu.sh
2025-05-11 19:18:01 +02:00

15 lines
287 B
Bash
Executable File

#!/bin/sh
options="Lock\nLogout\nShutdown\nReboot\nCancel"
chosen=$(echo -e "$options" | rofi -dmenu \
-p ":>" \
-lines 5)
case "$chosen" in
*Lock) i3lock -c 000000 ;;
*Logout) i3-msg exit ;;
*Shutdown) systemctl poweroff ;;
*Reboot) systemctl reboot ;;
*Cancel) exit 0 ;;
esac