#!/usr/bin/env sh WHAT="$(printf " Shutdown\n Reboot\n Lock\n Suspend" | rofi -dmenu -i -p 'Powermenu' -l 4 -width 10px)" if [ -z "$WHAT" ]; then exit; fi case "$WHAT" in " Shutdown") systemctl poweroff;; " Suspend") lockscreen; systemctl suspend;; " Lock") lockscreen;; " Reboot") systemctl reboot esac