#!/bin/sh #option=`echo "Cancel\nSuspend\nShutdown\nRestart" | dmenu -p "Power Menu " -nb "#AA0000" -nf "#FFF" -sb "#FF0000" -sf "#FFF" || exit` # Run this separately from the case statement so dmenu prompt closes before running the command [ -n "$1" ] && option="$1" || option=`echo "Cancel\nSuspend\nShutdown\nRestart" | dmenu -p "Power Menu " -nb "#AA0000" -nf "#FFF" -sb "#FF0000" -sf "#FFF" -nhb "#AA0000" -shb "#FF0000" -shf "#FAA" || exit` # Run this separately from the case statement so dmenu prompt closes before running the command case $option in Suspend) launch zzz ;; Shutdown) launch off ;; Restart) launch res ;; esac