dotfiles/scripts/rofi/powermenu.sh
2021-07-11 16:54:17 +03:00

20 lines
469 B
Bash
Executable File

#!/bin/bash
if [ -z "$@" ]; then
echo -en "Shutdown\0icon\x1fsystem-shutdown\n"
echo -en "Logout\0icon\x1fsystem-log-out\n"
echo -en "Suspend\0icon\x1fsystem-suspend\n"
echo -en "Reboot\0icon\x1fsystem-restart\n"
else
if [ "$1" = "Shutdown" ]; then
shutdown now
elif [ "$1" = "Logout" ]; then
i3-msg exit
elif [ "$1" = "Reboot" ]; then
reboot
elif [ "$1" = "Suspend" ]; then
systemctl suspend
fi
fi