aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/my-dmenu-run24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/my-dmenu-run b/bin/my-dmenu-run
new file mode 100755
index 0000000..6596b52
--- /dev/null
+++ b/bin/my-dmenu-run
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+tui_apps=(
+ vim
+ mutt
+
+ nnn
+ ranger
+
+ newsboat
+ podboat
+ cmus
+)
+
+shell=${SHELL:-"/bin/sh"}
+terminal=${TERMINAL:-"/usr/bin/xterm"}
+
+prog=$(dmenu_path | dmenu "$@")
+
+if [[ " ${tui_apps[*]} " =~ " ${prog} " ]]; then
+ prog="$terminal -e $prog"
+fi
+
+echo "$prog" | $shell &