[wiki] [sites] dmenu_run_i: a few functional improvements || Axel McLaren

From: <git_AT_suckless.org>
Date: Wed, 17 Apr 2024 00:20:18 +0200

commit d5a61a4c7efb91bb211d4bde7c3e19ac2e60d2ff
Author: Axel McLaren <scm_AT_axml.uk>
Date: Tue Apr 16 22:16:04 2024 +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

diff --git a/tools.suckless.org/dmenu/scripts/dmenu_run_i b/tools.suckless.org/dmenu/scripts/dmenu_run_i
index ca50c392..41aac2cb 100755
--- a/tools.suckless.org/dmenu/scripts/dmenu_run_i
+++ b/tools.suckless.org/dmenu/scripts/dmenu_run_i
_AT_@ -8,6 +8,7 @@ test -s "$HOME"/.dmenurc && . "$HOME"/.dmenurc
 cmd="$(dmenu_path | dmenu "$_AT_")"
 
 case $cmd in
- *\!) "${TERMINAL:-st}" -e "${cmd%?}" & ;;
- *) "${cmd}" & ;;
+ '') ;;
+ *\!) exec "${TERMINAL:-st}" -e ${cmd%?} & ;;
+ *) exec ${cmd} & ;;
 esac
Received on Wed Apr 17 2024 - 00:20:18 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 17 2024 - 00:24:50 CEST