You are not logged in.
Hi! I'm on openbox and i want to set icons for my static menu ( i dont have icons there yet) so i added "<applicationIcons>yes</applicationIcons>" to my rc.xml in the menu section and now i want to run obmenu-generator to add icons to my menu. But i dont know how the commandline should look like to do this? so what must i do to add icons?
Offline
Offline
Doesn't help!
With
obmenu-generator -i -s -cit is overwriting my whole menu and I cant configure it again cause it's toooo big.
Offline
Oh, well you didn't mention that you didn't want to regenerate the menu...
Maybe this helps: https://wiki.archlinux.org/index.php/Op … -generator
Offline
Hää? can you explain me please, I don't understand how to do/what they mean .. ;(
Offline
I think it means that you create the file ~/.config/openbox/menu.xml with the following content:
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu>
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i">
</menu>
</openbox_menu>Offline
But isn't my current menu overwritten then???
Offline
Well, yes. It's dynamically generated. I don't really understand what you're expecting here. Either you regenerate a static menu/use a dynamically generated menu or you go through your current menu file adding
icon="/path/to/icon.png"to every single entry as per https://bbs.archlinux.org/viewtopic.php?id=175958
Last edited by Chazza (2015-09-26 16:54:16)
Offline
Ahh thats what i want. Adding these lines. But i can't do it by hand. Isn't it possible that it is generated? I though it is possible to generate a menu with icons based on my current one? no or yes?
Offline
I'm afraid I don't know of anything to automate the process off the top of my head. I suppose you throw together some sort of script that parses the menu, looks up the icon from the associated .desktop file and then adds the icon= lines.
Offline
So obmenu-generator cant just add the icons to my current menu??
Offline
Don't know, can't say I've ever used it before. Maybe try just running obmenu-generator -i and see if that adds the icons to your current menu without trying to regenerate it?
Offline
Nope it doesnt ;( Any other solution?
Offline
You can config the menu generated with obmenu-generator by editing ~/.config/obmenu-generator/schema.pl
It's in perl but it's relatively easy to edit even if you don't know anything about perl.
Then you can regenerate the menu with
obmenu-generator -i -s -cIt will override your old menu, though.
Offline
Ough. But I don't have time to create such complex template cause I don't have any idea about perl!
But when someone could make me a theme that will "add icons to my current one" would be great!
Offline
Here is my menu, maybe someone can make a scheme? http://ix.io/l26
Offline
Oh dear - I have no idea what to do with this thread. I suppose the newbie corner is a good place, but I'm tempted to put it in TGN as the current posting strategey of the OP is clearly directing this thread to nowhere.
Tekkz, please take more time to think about your question and what you actually need help with so you don't end up waisting the time and goodwill of our members.
Please read the following guides:
how to ask smart questions
help vampires
Recognize that no one here is paid, and no one has any need to help you. So if you drag people around with this back and forth of whether you want this automated, not automated, or partially automated, etc, you are likely going to make them all run out of patience so they wont bother helping you anymore.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
Sorry but you told me that there is no program which can help me, you told me that i can do something with perl, what i can't do, so what do you want me todo now?
Offline
I cooked up this script in Python that should automate the adding of the icon= lines. Note that it doesn't add icons for categories yet and also note that it will not work if the item label is not the same as the name in the .desktop file, e.g. Gimp will not work - it must be GNU Image Manipulation Program. Anyway, feel free to mess around with it if you like: https://github.com/charlesbos/my-script … onadder.py
Edit: added support for categories and non-standard names.
Last edited by Chazza (2015-09-27 16:05:43)
Offline
Thanks! Works fine, but sometimes it cant find the icon but i set the name correct. i just added the icons manually now, thanks anyway!!
Offline
No probs. Just for the hell of it, I'm adding a fix for names like Gimp so it can get icons for those as well.
Offline
How do you do this?
Offline
So if matching by name fails, we try and match the execute line in the menufile with the Exec= line in the .desktops. If that also fails, we try and match the execute line with the .desktop filename. And if that fails there's nothing more we can do. I've just added the fix so I'll push it to github now.
Offline
ah nice
okay
good work!
Offline
Thanks. As well as the support for the non-standard names, I've also added support for category icons. I think the script should now do everything you originally asked for.
Offline