diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-06-20 13:57:23 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-06-20 13:57:23 -0700 |
commit | e12e88483cc0a2dbdc2b6ff6a3c45750cfc17d1e (patch) | |
tree | 453126005a4867fafc3693d5976e1730e8ca2531 | |
parent | db8e974d48b8a9de58f660f159a780dce2992bb7 (diff) |
fix: added aux menu files
-rwxr-xr-x | bin/menu_path | 13 | ||||
-rwxr-xr-x | bin/menu_run | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bin/menu_path b/bin/menu_path new file mode 100755 index 0000000..151a637 --- /dev/null +++ b/bin/menu_path @@ -0,0 +1,13 @@ +#!/bin/sh + +cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" +cache="$cachedir/menu_run" + +[ ! -e "$cachedir" ] && mkdir -p "$cachedir" + +IFS=: +if filter -dqr -n "$cache" $PATH; then + filter -flx $PATH | sort -u | tee "$cache" +else + cat "$cache" +fi diff --git a/bin/menu_run b/bin/menu_run new file mode 100755 index 0000000..5a1b9a0 --- /dev/null +++ b/bin/menu_run @@ -0,0 +1,2 @@ +#!/bin/sh +menu_path | menu "$@" | ${SHELL:-"/bin/sh"} & |