From 9f008af03f54ae9a3f9aecb83581cd79a84be7a3 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 4 Feb 2022 22:40:02 +0800 Subject: Add my custom dmenu_run script --- bin/my-dmenu-run | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bin/my-dmenu-run 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 & -- cgit v1.2.3