Because there is absolutely no ideological disagreement whatsoever between the XDG and suckless.org people, I've written this script that scans a collection of directories you specify for XDG .desktop files, parses them, and then builds a cache file you can select from using dmenu to launch programs as if it were xfce-menu or what have you.
The github: https://github.com/lharding/dmenu-xdg
It's pretty rough at the moment (hardcoded file locations, no error handling at all), this is mostly a trial to see if anyone but me is interested in something like this before I go polishing it overmuch.
To use, run install.sh or copy the files into ~/bin, and copy the .conf file into ~/.config and modify it as you please (it's just a python file that gets exec'd, so you can put any site-specific hackery you want in there). Then hook build-menu.py into a cronjob (or if your machine has a decent SSD just alias it to run before you run dmenu-xdg - for me it takes under 200ms to scan all of /usr/share), and then invoke dmenu-xdg by your quicklaunch method of choice.
In case you didn't know, there is a perl script that just just what you are describing that comes with i3. You can check it out here if you want.
Huh, so it does, and it includes all the features I had on my roadmap! Thanks for the pointer.
I'll leave this up here as a solution for really seriously RAM-constrained (the actual runtime invokation is just sh, not even bash) machines (Openpandora, Rasberry Pi, etc), which is what originally inspired me to write it.
There is also a c version of the i3 script as part of the j4tools collection. This helps with speed and memory
Last edited by progandy (2013-08-15 20:56:30)