#!/usr/bin/env bash

case "$(printf "logout\nreboot\nshutdown\nsleep\n" | wofi --dmenu -i -H 500 -W 250 -x 0 -y 0 )" in
        'logout') swaymsg exit;;
        'sleep') loginctl suspend ;;
        'reboot') sudo /run/current-system/profile/sbin/reboot ;;
        'shutdown') sudo /run/current-system/profile/sbin/halt ;;
        *) exit 1 ;;
esac
