[dev] Automatically update .dmenu_cache when content of PATH changes, using inotify

From: Troels Henriksen <athas_AT_sigkill.dk>
Date: Wed, 11 May 2011 11:49:29 +0200

I wrote a small tool that runs in the background and automatically
recomputes the dmenu_path cache when necessary. It requires
inotify-tools.

#!/bin/sh
#
# Rerun dmenu_path (reconstructing the cache) whenever a file is
# removed or added to a directory in PATH. Start this in the
# background and enjoy. Requires inotify-tools.

(IFS=":"; inotifywait -q -e move -e create -e delete $PATH -m) \
| while read line; do dmenu_path > /dev/null; done

-- 
\  Troels
/\ Henriksen
Received on Wed May 11 2011 - 11:49:29 CEST

This archive was generated by hypermail 2.2.0 : Wed May 11 2011 - 12:00:04 CEST