dmenu_path 240 B

1234567891011121314
  1. #!/bin/sh
  2. cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}"
  3. cache="$cachedir/dmenu_run"
  4. [ ! -e "$cachedir" ] && mkdir -p "$cachedir"
  5. IFS=:
  6. if stest -dqr -n "$cache" $PATH; then
  7. stest -flx $PATH | sort -u | tee "$cache"
  8. else
  9. cat "$cache"
  10. fi