obtap - An openbox menu generator like none before. (BETA)
14 replies, posted
[quote](When I say none before I mean none that I could find. If I could find one, I wouldn't have to make this then. Anyway..)
Hey guys, I'm here to present my project 'obtap'. It's inspired by [url=http://launchpad.net/obmenugen]obmenugen[/url], a great menu generator written in D which I've used before obtap. The reason I don't use it anymore is because it wasn't as customizable as I'd of liked it to be and that's why I've made obtap.
I've developed a small (under <150KiB, only using the C++ standard library which means you don't have to install any dependencies) Openbox menu generator that's grown to do many things:
obtap can generate pipe menus, static menus, a dynamically updating menu (basically a menu with it's contents a pipe menu).
obtap can easily add separators for menu layout and edit entries in such ways of renaming/merging categories, setting entry categories, renaming entries and deleting entries.
obtap has command line options to specify menu type (pipe, static, dynamic), the configuration file and the output.
The selling point, I'd say at least, is that obtap can (but doesn't have to) load desktop files from directories as entries, which you can then process with the above methods.
Here's my menu:
[img]http://i52.tinypic.com/6if9s7.png[/img][/quote]
[url=http://www.reddit.com/r/archlinux/comments/e4uls/obtap_an_openbox_menu_generator_like_none_before/]It's on reddit![/url]
[url=http://bbs.archlinux.org/viewtopic.php?id=107999]The actual announcement of it.[/url]
"Works well for me"and "Just tried your instructions and it's working great."
[QUOTE=Jookia;26025784][url=http://www.reddit.com/r/archlinux/comments/e4uls/obtap_an_openbox_menu_generator_like_none_before/]It's on reddit![/url]
[url=http://bbs.archlinux.org/viewtopic.php?id=107999]The actual announcement of it.[/url]
"Works well for me"and "Just tried your instructions and it's working great."[/QUOTE]
I'll have to check it out. I'm an Openbox person.
This is one of the things that kept me from using OpenBox. I'll try this out.
[editline]13th November 2010[/editline]
I found a minor error that I wrote a patch for. I didn't have an openbox directory in ~/.config so I would just get an error about menu.xml not existing.
My patch is on pastebin: [url]http://pastebin.com/D45tkSHD[/url]
mkpath() is written in C because I don't know how to do it in C++. :v:
Also, in getFullPath() I just had it return homePath instead of that realpath() stuff because for me it was just returning "", and I don't know why.
[editline]13th November 2010[/editline]
Oh, and the patch checks if the menu.xml file exists. Because if it doesn't exist it still asks if you want to overwrite it. If it doesn't exist, then there is nothing to overwrite so it'll just not ask you.
[editline]13th November 2010[/editline]
For some reason the type(openboxDynamic) option doesn't work for me. openboxStatic does though.
Whats the difference?
You can change the output file in the configuration file. Does that not work?
openboxDynamic creates a menu.xml for Openbox with the root menu being an openboxPipe menu. If you want a better explanation. Run obtap with the output set to - .
getFullPath returns "" if the file doesn't exist.
Anyway, could you FULLY explain what the error is, your post is very vague.
Yeah, I could have changed the output, but doesn't openbox expect menu.xml to be in that one location?
This is what I get when I use openboxDynamic:
[quote]
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="" execute=
"bin/obtap -c goodies/example.conf -t openboxpipe -o -"
/>
</openbox_menu>
[/quote]
Actually, I just realized that it's probably right and it just reruns obtap when you use the menu.
The only problem with that is if bin/obtap isn't in your PATH. Same with goodies/example.conf.
So, if I'm correct, you can basically make a sort of favorites menu on your desktop with this?
[QUOTE=PvtCupcakes;26057866]Yeah, I could have changed the output, but doesn't openbox expect menu.xml to be in that one location?
This is what I get when I use openboxDynamic:
Actually, I just realized that it's probably right and it just reruns obtap when you use the menu.
The only problem with that is if bin/obtap isn't in your PATH. Same with goodies/example.conf.[/QUOTE]
You've put obtap in bin obviously. obtap can be run from anywhere and it'll get the full path.
[code][jookia@jookia-arch obtap (master)]$ bin/obtap -o-
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="" execute=
"/home/jookia/Programming/obtap/bin/obtap -c /home/jookia/.config/obtap.conf -t openboxpipe -o -"
/>
</openbox_menu>[/code]
[editline]15th November 2010[/editline]
[QUOTE=Sir Whoopsalot;26063243]So, if I'm correct, you can basically make a sort of favorites menu on your desktop with this?[/QUOTE]
No, Openbox has a unique menu that uses XML to display its entries. This generates the XML for it instead of people having to do it themselves.
[QUOTE=Jookia;26063331]
No, Openbox has a unique menu that uses XML to display its entries. This generates the XML for it instead of people having to do it themselves.[/QUOTE]
So, rather than editing an XML file to change the applications and stuff at the top, you put in the options in Openbox and it generates an XML file for you to replace the original with?
Excuse me if I'm sounding obnoxious. I'm a huge newb at linux, plus the fact I couldn't really deduce just what this does, which makes me a tad annoying.
[QUOTE=Sir Whoopsalot;26063676]So, rather than editing an XML file to change the applications and stuff at the top, you put in the options in Openbox and it generates an XML file for you to replace the original with?
Excuse me if I'm sounding obnoxious. I'm a huge newb at linux, plus the fact I couldn't really deduce just what this does, which makes me a tad annoying.[/QUOTE]
No, Openbox is a window manager without all the classy stuff. Ubuntu uses GNOME, a desktop environment with widgets, toolbars, panels, etc. Openbox is just a right click menu.
This generate an Openbox menu.
Yeah, the Openbox menu is like the "All Programs" list in Windows except they're sorted by category usually.
So, how the hell do I use this and what all does it do?
[QUOTE=ASmellyOgreV2;26066561]So, how the hell do I use this and what all does it do?[/QUOTE]
Why didn't you read the post. Why.
[QUOTE=Jookia;26070261]Why didn't you read the post. Why.[/QUOTE]
Well, I know it has something to do with making dynamic openbox menus, but all I see is an example of what it can do. As far as I can see (and please correct me if I'm wrong) there is no feature list and no directions beyond how to make your example.
[QUOTE=ASmellyOgreV2;26070529]Well, I know it has something to do with making dynamic openbox menus, but all I see is an example of what it can do. As far as I can see (and please correct me if I'm wrong) there is no feature list and no directions beyond how to make your example.[/QUOTE]
I don't know what to tell you, man.
It's a better way to make an Openbox menu that can autoupdate, be static or be a pipe menu without manually doing it.
I can't get this working, when I try:[code]bin/obtap -c goodies/example.conf[/code] I get the error:[code]Cannot open output file ~/.config/openbox/menu.xml'.[/code]
And yes, I am in the obtap folder and my menu.xml is where it should be.
[editline]25th November 2010[/editline]
Ignore that, got it working now. For some reason my user didn't have permission to edit menu.xml
Sorry, you need to Log In to post a reply to this thread.