ArchRice/rofi/powermenu.sh
2025-05-11 17:32:25 +02:00

16 lines
351 B
Bash
Executable File

#!/bin/sh
options="Shutdown\nReboot\nLock\nLogout\nCancel"
chosen=$(echo -e "$options" | rofi -dmenu \
-theme ~/.config/rofi/ayu-retro.rasi \
-p "╔═[ POWER MENU ]═╗" \
-lines 5)
case "$chosen" in
*Shutdown) systemctl poweroff ;;
*Reboot) systemctl reboot ;;
*Lock) i3lock -c 000000 ;;
*Logout) i3-msg exit ;;
*Cancel) exit 0 ;;
esac