From eba1b09b5b72806d90dc255f3dba1eb573fa9c08 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sat, 24 Dec 2022 10:48:30 -0500 Subject: add patch: dmenu_omit - filter omitted entries dmenu_omit is a filtering tool that appends any supplied entries to a list of items to filter from the dmenu result. This allows the user to remove troublesome items that exist in path, that need to exist in path, but are useless from dmenu. dmenu_omit is the command line tool to append these items to the list. dmenu_path was modified to filter based on the items in this list. dmenu_omitlist is the file stored in your configdir containing these files. Makefile was updated to install/uninstall the dmenu_omit --- dmenu_path | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dmenu_path') diff --git a/dmenu_path b/dmenu_path index 3a7cda7..4c2a5b4 100755 --- a/dmenu_path +++ b/dmenu_path @@ -2,12 +2,15 @@ cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" cache="$cachedir/dmenu_run" +configdir="${XDG_CONFIG_HOME:-"$HOME/.config/dmenu"}" +config="$configdir/dmenu_omitlist" [ ! -e "$cachedir" ] && mkdir -p "$cachedir" +[ ! -e "$configdir" ] && mkdir -p "$configdir" IFS=: if stest -dqr -n "$cache" $PATH; then - stest -flx $PATH | sort -u | tee "$cache" + stest -flx $PATH | sort -u | grep -wvF -f $config | tee "$cache" else cat "$cache" fi -- cgit v1.2.3-54-g00ecf