qubes.GetAppmenus 494 B

12345678910
  1. #!/bin/sh
  2. find /usr/share/applications/ /usr/local/share/applications/ -name '*.desktop' -print0 2>/dev/null | \
  3. xargs -0 awk '
  4. BEGINFILE { entry="" }
  5. /^\[/ { if (tolower($0) != "\[desktop entry\]") nextfile }
  6. /^Exec=/ { entry = entry FILENAME ":Exec=qubes-desktop-run " FILENAME "\n"; next }
  7. /^NoDisplay *= *true$/ { entry=""; nextfile }
  8. /=/ { entry = entry FILENAME ":" $0 "\n" }
  9. ENDFILE { print entry }
  10. ' 2> /dev/null