ArchRice/rofi/powermenu.sh
2025-05-11 19:26:58 +02:00

14 lines
296 B
Bash
Executable File

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