Files
sway-rising/.config/rofi/powermenu.sh
T
2026-10-27 23:56:04 +05:00

12 lines
477 B
Bash
Executable File

#!/bin/bash
# Power menu in rofi
opts=$' Lock\n Logout\n Suspend\n Reboot\n Shutdown'
choice=$(printf '%s' "$opts" | rofi -dmenu -i -p "Power" -theme ~/.config/rofi/catppuccin.rasi -theme-str 'window {width: 300px;} listview {lines: 5;} entry {enabled: false;}')
case "$choice" in
*Lock) ~/.config/sway/lock.sh ;;
*Logout) swaymsg exit ;;
*Suspend) systemctl suspend ;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl poweroff ;;
esac