Saturday, September 3, 2016

9menu vs ratmenu vs dmenu

Today I played around with some of the X11 popup menu options available out there, after I had started using i3 as my window manager. i3's simplicity is great, but it also left a bit of a hole in my toolset, as I often used a system-wide context menu, or root menu, to get access to shortcuts, such as.
  1. go into dynamic submenu that contains a list of recent clipboard contents to get them back in the copy-paste buffer
  2. navigate files and folders quickly through submenus
  3. use xfreerdp to connect to the windows machine hostname that I currently have highlighted in another document
  4. call a special paste function that types my clipboard contents (in some remote sessions such as Java-based ones, copy-paste does not work)
  5. take the current X selection and remove http:// and https:// from it (due to Chrome undermining copy and inserting the protocol into copied hostnames

Summary

ratmenu

  • has a "prev" function to recall the previous menu in a hierarchy
  • will not take STDIN or process a script to generate menus
  • no mouse support
  • no hinting that it's a popup (though you can tell your tiling WM to pop it out)
  • easy config

9menu

  • mouse support
  • no text search to select items
  • easy config
  • will take STDIN?
  • window hints for a popover

dmenu

  • full text search to select items
  • no back option, but you can simply call the previous dmenu
  • no mouse support
  • scripts can be used to generate menus
  • a bit tricky to get it to recognize your bashrc

Ideally, there would be a standalone port of the Openbox root menu. However, the code looks very intertwined with Openbox itself. In addition, I find the XML of the Openbox root menu rc.xml to be pretty messy, and would probably re-implement it with a json or plaintext structure.

So, without being able to port the Openbox root menu, the best option for me is 9menu. I've successfully written dynamic menus for it, though nothing too complicated

No comments:

Post a Comment