# Module: `menubar`

Menubar module, which aims to provide a freedesktop menu alternative.

List of menubar keybindings: ---

Keybinding | Description
--- | ---
`Left` `C-j` | select an item on the left
`Right` `C-k` | select an item on the right
`Backspace` | exit the current category if we are in any
`Escape` | exit the current directory or exit menubar
`Home` | select the first item
`End` | select the last
`Return` | execute the entry
`C-Return` | execute the command with awful.spawn
`C-M-Return` | execute the command in a terminal

### Info:

- Copyright: 2011-2012 Alexander Yakushev
- Originally authored by: Alexander Yakushev <yakushev.alex@gmail.com>
  (Full contributors list available on our github project)

## Static module functions

menubar.refresh (scr) | Refresh menubar's cache by reloading .desktop files. |
menubar.show (scr) | Show the menubar on the given screen. |
menubar.hide () | Hide the menubar. |

## Theme variables

beautiful.menubar_fg_normal | color | Menubar normal text color. |
beautiful.menubar_bg_normal | color | Menubar normal background color. |
beautiful.menubar_border_width | number | Menubar border width. |
beautiful.menubar_border_color | color | Menubar border color. |
beautiful.menubar_fg_focus | color | Menubar selected item text color. |
beautiful.menubar_bg_focus | color | Menubar selected item background color. |
beautiful.menubar_font | font | Menubar font. |

## Deprecated functions

menubar.get (scr) | Get a menubar wibox. | Deprecated

## Tables

menubar.geometry | Specifies the geometry of the menubar. |
menubar.prompt_args | Allows user to specify custom parameters for prompt.run function (like colors). |

## Fields

menubar.cache_entries | boolean | When true the .desktop files will be reparsed only when the extension is initialized. |
menubar.show_categories | boolean | When true the categories will be shown alongside application entries. |
menubar.match_empty | boolean | When false will hide results if the current query is empty |
menubar.right_margin | number | Width of blank space left in the right side. |
menubar.right_label | string | Label used for "Next page", default "▶▶". |
menubar.left_label | string | Label used for "Previous page", default "◀◀". |

## Static module functions

🔗 menubar.refresh (scr)
  Refresh menubar's cache by reloading .desktop files.

  ### Parameters:

  Name |  | Type(s) | Description | Default value
  --- | --- | --- | --- | ---
  scr | Optional | screen | Screen. | `awful.screen.focused()`

🔗 menubar.show (scr) · 7 theme variables
  Show the menubar on the given screen.

  ### Parameters:

  Name |  | Type(s) | Description | Default value
  --- | --- | --- | --- | ---
  scr | Optional | screen | Screen. | `awful.screen.focused()`

  Click to display more

  ### Consumed theme variables:

  Theme variable | Usage
  --- | ---
  beautiful.menubar_fg_normal |
  beautiful.menubar_bg_normal |
  beautiful.menubar_border_width |
  beautiful.menubar_border_color |
  beautiful.menubar_fg_focus |
  beautiful.menubar_bg_focus |
  beautiful.menubar_font |

🔗 menubar.hide ()
  Hide the menubar.

## Theme variables

🔗 beautiful.menubar_fg_normal color
  Menubar normal text color.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_bg_normal color
  Menubar normal background color.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_border_width number
  Menubar border width.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_border_color color
  Menubar border color.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_fg_focus color
  Menubar selected item text color.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_bg_focus color
  Menubar selected item background color.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.
🔗 beautiful.menubar_font font
  Menubar font.
  Click to display more

  ### Used by:

  - show Show the menubar on the given screen.

## Deprecated functions

🔗 menubar.get (scr)
  Get a menubar wibox.

  ### Parameters:

  Name |  | Type(s) | Description
  --- | --- | --- | ---
  scr | Optional | screen | Screen.

  ### Returns:

  menubar wibox.

## Tables

🔗 menubar.geometry
  Specifies the geometry of the menubar. This is a table with the keys x, y, width and height. Missing values are replaced via the screen's geometry. However, missing height is replaced by the font size.
🔗 menubar.prompt_args
  Allows user to specify custom parameters for prompt.run function (like colors). This will merge with the default parameters, overriding affected values.

  ### See also:

  awful.prompt | Convert a wibox.widget.textbox into an input prompt. | module

## Fields

🔗 menubar.cache_entries boolean
  When true the .desktop files will be reparsed only when the extension is initialized. Use this if menubar takes much time to open.
🔗 menubar.show_categories boolean
  When true the categories will be shown alongside application entries.
🔗 menubar.match_empty boolean
  When false will hide results if the current query is empty
🔗 menubar.right_margin number
  Width of blank space left in the right side.
🔗 menubar.right_label string
  Label used for "Next page", default "▶▶".
🔗 menubar.left_label string
  Label used for "Previous page", default "◀◀".

generated by LDoc 1.5.0