My dmenu build
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.
 
 
 
 
 
 

31 lines
362 B

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