diff options
author | Guangxiong Lin <[email protected]> | 2022-02-04 22:40:02 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-02-04 22:40:02 +0800 |
commit | 9f008af03f54ae9a3f9aecb83581cd79a84be7a3 (patch) | |
tree | f84884e5715bc7382678eb4f909a7024cc858700 /bin | |
parent | 43983b7240f4b64b6e8415beb296507a77c52587 (diff) | |
download | dotfiles-9f008af03f54ae9a3f9aecb83581cd79a84be7a3.tar.gz dotfiles-9f008af03f54ae9a3f9aecb83581cd79a84be7a3.tar.bz2 dotfiles-9f008af03f54ae9a3f9aecb83581cd79a84be7a3.zip |
Add my custom dmenu_run script
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/my-dmenu-run | 24 |
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 & |