I'm looking for something like Zenity or Yad, except I want something that behaves like a menu, namely: it opens right next to the cursor; it takes one click to select things; it's possible to have multiple levels.The closest thing I've found is actually Autokey's folders, but Autokey needs to always be running (even if I call autokey-run), which I'd prefer to avoid.The key requirement is that I be able to single click on something that appears near my cursor.Any ideas?
Is there a program that will launch a configurable context menu
command line;application;menu;zenity
Sawfish manages its menus with a companion program sawfish-menu. You can use that program even if you aren't running Sawfish as your window manager. The protocol between sawfish and sawfish-menu doesn't seem to be documented anywhere; it's inspired from the menu specification format in Sawfish itself.echo '(popup-menu ((_toplevel 0) (_submenu (_foo 1) () (_bar 2))))' |/usr/lib/sawfish/1.5.3/x86_64-pc-linux-gnu/sawfish-menusawfish-menu prints 0 if the user selects toplevel, etc. You can specify strings (in double quotes, or even without quotes if they're valid Lisp identifiers) instead of numbers for the entries. If the user aborts (e.g. by pressing Esc) then the output is ().Here's a summary of the input syntax of sawfish-menu.Start with (popup-menu and end with ).For a clickable menu entry, use (TEXT OUTPUT) where TEXT is the text of the entry and OUTPUT is what the program prints if this menu entry is selected.If there is an underscore in TEXT, the next character is the accelerator for that entry.You can put a check mark in front of a menu entry by adding (check . t), e.g. (Foo 42 (check . t)).You can put a bullet (radio button) in front of a menu entry by adding (group . SOMETHING) (check . t). Only one entry within a given group can have the button.You can make an entry be greyed out and non-selectable by adding (insensitive . t).For a submenu, use (TEXT ENTRY).For a separator, use ().Obviously, don't expect people to have this utility installed. It's typically not packaged separately from Sawfish, but it doesn't actually need anything from Sawfish itself; it's a rep script, rep being the Lisp dialect that Sawfish (and basically nothing else) is written in. On Debian, you need the rep-gtk package to run sawfish-menu, plus the script itself.