dmenu-yosh/dmenu_run

15 lines
277 B
Bash
Executable File

#!/bin/sh
set -efu
# dmenu_run improved
# command ending with '!', is started in the terminal.
test -s "$HOME"/.dmenurc && . "$HOME"/.dmenurc
cmd="$(dmenu_path | dmenu "$@")"
case "$cmd" in
*\!) "${TERMINAL:-urxvt}" -e "${cmd%?}" & ;;
*) IFS=' ' ${cmd} & ;;
esac