commit d5a61a4c7efb91bb211d4bde7c3e19ac2e60d2ff
parent 82dc8e6b9664608d6ee1151f9d8e983ebcebd048
Author: Axel McLaren <scm@axml.uk>
Date: Tue, 16 Apr 2024 22:16:04 +0000
dmenu_run_i: a few functional improvements
- avoid keeping a newly spawned shell
- command argument support for both gui and terminal apps
- syntax error on command execution abort
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools.suckless.org/dmenu/scripts/dmenu_run_i b/tools.suckless.org/dmenu/scripts/dmenu_run_i
@@ -8,6 +8,7 @@ test -s "$HOME"/.dmenurc && . "$HOME"/.dmenurc
cmd="$(dmenu_path | dmenu "$@")"
case $cmd in
- *\!) "${TERMINAL:-st}" -e "${cmd%?}" & ;;
- *) "${cmd}" & ;;
+ '') ;;
+ *\!) exec "${TERMINAL:-st}" -e ${cmd%?} & ;;
+ *) exec ${cmd} & ;;
esac