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