From e5209aad576fe44d3965fcb94d6709348b0a93bf Mon Sep 17 00:00:00 2001 From: Peter Son Struschka Date: Sun, 11 Oct 2020 12:15:08 +0800 Subject: all: overhaul all: Remove old symlinks herbstluftwm: use polybar instead of dzen2 polybar: update config doom-emacs: update repository --- herbstluftwm/.local/bin/run_list.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 herbstluftwm/.local/bin/run_list.sh (limited to 'herbstluftwm/.local/bin/run_list.sh') diff --git a/herbstluftwm/.local/bin/run_list.sh b/herbstluftwm/.local/bin/run_list.sh new file mode 100755 index 0000000..463bbaf --- /dev/null +++ b/herbstluftwm/.local/bin/run_list.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env sh +set -eu #o pipefail + +cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"} +if [ -d "$cachedir" ]; then + cache=$cachedir/run_list +else + cache=$HOME/.run_list +fi + +#if [ ! -f "$cache" ] || [ $(find "$cache" -mmin +180) = "$cache" ]; then +IFS=':' +if [ ! -f "$cache" ] || [ $(find $PATH -prune -cnewer "$cache" 2>/dev/null |\ + head -c1 | wc -c) -eq 1 ]; then + + find -L $PATH -maxdepth 1 -type f -executable -printf "%f\n" 2>/dev/null |\ + sort -u | tee "$cache" +else + cat "$cache" +fi -- cgit v1.2.3