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.

15 lines
311 B

17 years ago
13 years ago
13 years ago
  1. #!/bin/sh
  2. cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
  3. if [ -d "$cachedir" ]; then
  4. cache=$cachedir/dmenu_run
  5. else
  6. cache=$HOME/.dmenu_cache
  7. fi
  8. (
  9. IFS=:
  10. if [ "`ls -dt $PATH "$cache" | head -n 1`" != "$cache" ]; then
  11. lsx $PATH | sort -u | tee "$cache" | dmenu "$@"
  12. else
  13. dmenu "$@" < "$cache"
  14. fi
  15. ) | exec sh