Module awful.menu

Menu module for awful

Authors:

Damien Leone <damien.leone@gmail.com>
Julien Danjou <julien@danjou.info>

Copyright© 2008 Damien Leone, Julien Danjou

Release: v3.3.4

Functions

clients (menu) Build a popup menu with running clients and shows it.
hide (menu) Hide a menu popup.
new (menu, parent, num) Open a menu popup.
setkeys (keys) Set key bindings for menu navigation.
show (menu, keygrabber) Show a menu.
toggle (menu, keygrabber) Toggle menu visibility.


Functions

clients (menu)
Build a popup menu with running clients and shows it.

Parameters

  • menu: Menu table, see new() function for more informations

Return value:

The menu.
hide (menu)
Hide a menu popup.

Parameters

  • menu: The menu to hide.
new (menu, parent, num)
Open a menu popup.

Parameters

  • menu: Table containing the menu informations. Key items: Table containing the displayed items, each element is a tab containing: item name, tiggered action, submenu table or function, item icon (optional). Keys [fg|bg]_[focus|normal], border, border_width, submenu_icon, height and width override the default display for your menu, each of them are optional. Key auto_expand controls the submenu auto expand behaviour by setting it to true (default) or false.
  • parent: Specify the parent menu if we want to open a submenu, this value should never be set by the user.
  • num: Specify the parent's clicked item number if we want to open a submenu, this value should never be set by the user.
setkeys (keys)
Set key bindings for menu navigation.

Parameters

  • keys: Table containing the following keys: up, down, exec, back, close. If a key is missing the default key binding will be used, defaults are respectively: "Up", "Down", "Return", "Left", "Escape".
show (menu, keygrabber)
Show a menu.

Parameters

  • menu: The menu to show.
  • keygrabber: A boolean enabling or not the keyboard navigation.
toggle (menu, keygrabber)
Toggle menu visibility.

Parameters

  • menu: The menu to show if it's hidden, or to hide if it's shown.
  • keygrabber: A boolean enabling or not the keyboard navigation.

Valid XHTML 1.0!