[wiki] [sites] [dmenu][script][dmenu_run_i] add '&' to run the cmd in the background and some reformat || explosion-mental
commit a357c68a828668950083b739c1d99869aa5b6638
Author: explosion-mental <explosion0mental_AT_gmail.com>
Date: Tue Apr 12 12:40:50 2022 -0500
[dmenu][script][dmenu_run_i] add '&' to run the cmd in the background
and some reformat
diff --git a/tools.suckless.org/dmenu/scripts/dmenu_run_i b/tools.suckless.org/dmenu/scripts/dmenu_run_i
index f952d1b7..ca50c392 100755
--- a/tools.suckless.org/dmenu/scripts/dmenu_run_i
+++ b/tools.suckless.org/dmenu/scripts/dmenu_run_i
_AT_@ -1,14 +1,13 @@
#!/bin/sh
+
# dmenu_run improved
-# if a command ends with "!", it is started in term.
+# command ending with '!', is started in the terminal.
+
+test -s "$HOME"/.dmenurc && . "$HOME"/.dmenurc
-termcmd="st -e"
-test -s $HOME/.dmenurc && . $HOME/.dmenurc
+cmd="$(dmenu_path | dmenu "$_AT_")"
-cmd="$(dmenu_path | dmenu $_AT_)"
case $cmd in
- *\! ) ${termcmd} "${cmd%?}" ;;
- * ) ${cmd} ;;
+ *\!) "${TERMINAL:-st}" -e "${cmd%?}" & ;;
+ *) "${cmd}" & ;;
esac
-exit
-
Received on Tue Apr 12 2022 - 19:49:04 CEST
This archive was generated by hypermail 2.3.0
: Tue Apr 12 2022 - 20:00:51 CEST