#!/bin/sh # simple power menu script load_config() { . $HOME/.config/dmenu/config } menu() { case "$(printf "shutdown\\nreboot" | $DMENU -p "Choose your poison")" in "shutdown") loginctl poweroff ;; "reboot") loginctl reboot ;; esac } main() { load_config menu } main $@