dmenu for lunch applications in dwm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
786 B

  1. #!/bin/sh
  2. CACHE=$HOME/.dmenu_cache
  3. IFS=:
  4. uptodate() {
  5. test ! -f $CACHE && return 1
  6. for dir in $PATH
  7. do
  8. test $dir -nt $CACHE && return 1
  9. done
  10. return 0
  11. }
  12. if ! uptodate
  13. then
  14. for dir in $PATH
  15. do
  16. for file in "$dir"/*
  17. do
  18. test -x "$file" && echo "${file##*/}"
  19. done
  20. done | sort | uniq > $CACHE
  21. fi
  22. cat $CACHE