#!/bin/sh

# dmenu_run improved
# command ending with '!', is started in the terminal.

test -s "$HOME"/.dmenurc && . "$HOME"/.dmenurc

cmd="$(dmenu_path | dmenu "$@")"

case $cmd in
    '')  ;;
    *\!) exec "${TERMINAL:-st}" -e ${cmd%?} & ;;
    *)   exec ${cmd} & ;;
esac
