Files
dotfiles/hypr/scripts/power-menu.sh

20 lines
366 B
Bash
Executable File

#!/usr/bin/env bash
config="$HOME/.config/rofi/power-menu.rasi"
actions=$(echo -e " Suspend\n Shutdown\n Reboot")
selected_option=$(echo -e "$actions" | rofi -dmenu -i -config "${config}" -p "Power:")
case "$selected_option" in
*Shutdown)
systemctl poweroff
;;
*Reboot)
systemctl reboot
;;
*Suspend)
systemctl suspend
;;
esac