ricefields/rofi/LilieshBase/powermenu.sh
2025-05-31 19:37:20 +02:00

36 lines
767 B
Bash
Executable file

#!/bin/env bash
logout="󰩈 Logout"
sleep=" Sleep"
shutdown=" Shutdown"
reboot=" Reboot"
# Get answer from user via rofi
selected=$(echo "$logout
$sleep
$reboot
$shutdown" | rofi -dmenu\
-i\
-p "Power"\
-config "~/.config/rofi/powermenu.rasi"\
-font "Cascadia Code 12"\
-width "15"\
-lines 5\
-line-margin 3\
-line-padding 10\
-scrollbar-width "0" )
case $selected in
$logout)
hyprctl dispatch exit
;;
$sleep)
systemctl suspend
;;
$reboot)
systemctl reboot
;;
$shutdown)
systemctl poweroff
;;
esac