Module awful.menu
Creation of menus.
Authors:
Damien Leone <damien.leone@gmail.com> |
Julien Danjou <julien@danjou.info> |
Copyright© 2008 Damien Leone, Julien Danjou
Release: v3.4.3
Functions
clients (menu, keygrabber) | Build a popup menu with running clients and shows it. |
hide (menu) | Hide a menu popup. |
new (menu, parent, num) | Open a menu popup. |
show (menu, keygrabber) | Show a menu. |
toggle (menu, keygrabber) | Toggle menu visibility. |
Tables
menu_keys | Key bindings for menu navigation. |
Functions
- clients (menu, keygrabber)
-
Build a popup menu with running clients and shows it.
Parameters
- menu: Menu table, see new() function for more informations
- keygrabber: A boolean enabling or not the keyboard navigation.
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.
- 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.