-   Linux - Software (
-   -   looking for: customizable pop-up menu solution (

David the H. 07-05-2009 04:07 AM

looking for: customizable pop-up menu solution
Short form:

I'm looking for a way to pop up a customizable menu at the pointer location with a hotkey or similar command.

Long form:

A long time ago when I was using Winblows, my Kensington trackball had an option to customize a "pop-up" menu that would appear at the cursor location and allow you to select from a user-configured list of commands. You could add things like cut/copy/paste, "type" custom text strings, or launch programs with it.

Now I'm trying to simulate that option on Linux. Configuring the various commands I want to use is fairly easy with basic scripting. But I first need something that will create the menu system the way I want it. So I'm asking if anyone here has any ideas.

I've looked at the various xdialog/qdialog/zenity options, but they don't seem to have the functionality I need. Unless I'm missing something, of course.

The closest I've found so far is 9menu. It basically does what I want, but it's very limited. It a) doesn't have nested menus, b) doesn't accept keyboard controls (even though the man page says it does), and c) is extremely ugly, being an old x-window program. It also pops up framed and appears in the toolbar, although I can get rid of those with kde's window customizing.

I'd really like to have something with a much better-looking qt or gtk2 style, and more options. I'm wondering if I'll have to create my own with something like wxpython or python/tk, but then I'd have to learn python first :(, so I'm asking here before I go in that direction.

So, any recommendations on how best to implement this?

tredegar 07-05-2009 06:43 AM

If you are running KDE, you should take a look at KDEs "Service Menus".
A good example of these is Charles Bouveyron 's kim (Kde Image Menu)
If you download and install that and take a look at how it works, I think you'll find the functionality you're looking for. Besides, kim is a most useful utility, and easily extended.

gapan 07-05-2009 07:18 AM

You could use openbox I guess. Even inside KDE or gnome. You can customize the openbox menu in any way you like.

David the H. 07-05-2009 07:55 AM

I'm having some trouble finding clear info on the service menus. From what I've found, it seems to be a way to add entries to existing kde context menus, particularly in konqueror. That's not really what I'm looking for. I want an independent app that will launch its own floating menu when I hit a hotkey, independent of any other program.

I hadn't thought of using something like openbox. Again, it's not something I'm really familiar with, but taking a look at the description, I can see how it could be used to call up a menu. But if I did that, would it integrate with kde and other programs? I mean, since it's a window manager, would it open up a standard kwin window, or its own managed windows? And what about things like cpp clipboard controls? Or is there some way to launch only the openbox menu, and leave the rest to the currently-running wm?

gapan 07-06-2009 01:33 AM

KWin will be replaced by openbox if you use it. I don't think there's a way not to (although I don't know openbox that well).

I remembered there was another option for you, take a look at popdown:

David the H. 07-06-2009 11:46 AM

Thank you gapan, I'll be checking that out. It looks like it might be just what I need.

Too bad it's not in the Debian repositories, but I'll be downloading it and putting it through its paces shortly.

David the H. 07-07-2009 01:47 PM

Well, I've checked it out, and popdown looks pretty good, almost exactly what I wanted.

I'm not 100% satisfied with it though. It's a pain having to configure a separate .desktop file for every command I want to include. And the program seems very finicky about what goes into these files. I tested it out with the ones in my kde Desktop directory, and it wouldn't accept half of them, and can't find the icons for some of the rest. It also doesn't seem to like raw commands either (perhaps because it's python and not a shell interpreter?), so it looks like I'll have to wrap everything up in scripts.

Still, I believe I can work with it. It does what I want. Thanks.

All times are GMT -5. The time now is 03:35 AM.