qubes.GetAppmenus 484 B

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