Open fredx181 opened 5 years ago
Well xlunch is a bit more modular. It really isn't only a launcher so building the desktop file generations into xlunch itself would probably not be a good idea. However writing a daemon that sits in the background and updates a list of entries that a script can then poll and forward to xlunch is certainly an idea. Personally I just have a bash script that looks for any files in .desktop that is newer than my entries file and uses genentries with the single file option to generate a line for it and appends it to the file. This combined with my script that reorders the entries file so they are in their last used order and I get pretty much the same thing. This script can of course be added as a package manager hook as well (if your system supports it), similar to how the AUR package works.
Maybe worthwhile to check this out for generating entries file:
https://github.com/fredx181/xlunch-menu
Experimental, but works very well for me !
This is modified "openbox-menu" from here:
https://bitbucket.org/geekless/openbox-menu/
It will generate entries file very fast reading from
/usr/share/applications
and$HOME/.local/share/applications
.Also has (nice) 'persistent' option (-p), running in the background it will update entries automatically if a .desktop launcher has been added to one of above mentioned locations.
Disadvantage is that more dependencies are required: gtk2 and menu-cache.
My C programming knowledge is very limited, what I just did was modifying the code by removing (emptying) generating Categories (and other unneeded content) and make it output just : Name;Icon;Command
A complete rewrite may be best of course, but I'm not capable to do that.
EDIT: would be nice if a similar code will be implemented in xlunch (hint :) )
Fred