dotfiles/.config/polybar/scripts/popup-powermenu.sh
2024-01-29 08:31:23 -06:00

26 lines
561 B
Bash

#!/bin/sh
case "$1" in
--popup)
yad=$(yad --width 300 --entry --undecorated --title "System Logout" --image=gnome-shutdown --text "Choose action:" --entry-text "Shutdown" "Reboot" "Logout" "Suspend")
case "$yad" in
Shutdown)
poweroff
;;
Reboot)
reboot
;;
Suspend)
hibernate
;;
Logout)
bspc quit
;;
esac
;;
*)
echo "#1"
;;
esac