From b5d772f01e410d4fe0dcdc661c958657fbf0ca28 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 19 Jun 2022 23:56:13 +0800 Subject: Switch to swaywm --- bin/my-dmenu | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 bin/my-dmenu (limited to 'bin/my-dmenu') diff --git a/bin/my-dmenu b/bin/my-dmenu new file mode 100755 index 0000000..fe514b0 --- /dev/null +++ b/bin/my-dmenu @@ -0,0 +1,28 @@ +#!/bin/bash + +tui_apps=( + vim + mutt + + nnn + ranger + + newsboat + podboat + cmus + ncmpcpp +) + +terminal=${TERMINAL:-"/usr/bin/xterm"} + +prog=$(dmenu_path | dmenu "$@") + +if [[ " ${tui_apps[*]} " =~ " ${prog} " ]]; then + prog="$terminal -e $prog" +fi + +if [[ "${prog}" == emacs ]]; then + prog="LC_CTYPE='zh_CN.UTF-8' emacs" +fi + +echo "$prog" -- cgit v1.2.3