Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C program for to generate entries file (xlunch-menu) #102

Open
fredx181 opened this issue Dec 8, 2018 · 1 comment
Open

C program for to generate entries file (xlunch-menu) #102

fredx181 opened this issue Dec 8, 2018 · 1 comment

Comments

@fredx181
Copy link
Contributor

fredx181 commented Dec 8, 2018

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

@PMunch
Copy link
Collaborator

PMunch commented Feb 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants