# Module `awful.hotkeys_popup.widget`

Popup widget which shows current hotkeys and their descriptions.

### Info:

- Copyright: 2014-2015 Yauheni Kirylau
- Author: Yauheni Kirylau <yawghen@gmail.com>

## Functions

new ([args]) | Create an instance of widget with hotkeys help.
widget_instance:show_help ([c[, s[, show_args]]]) | Show popup with hotkeys help.
widget_instance:add_hotkeys (hotkeys) | Add hotkey descriptions for third-party applications.
widget_instance:add_group_rules (group, data) | Add hotkey group rules for third-party applications.
show_help ([c[, s[, args]]]) | Show popup with hotkeys help (default widget instance will be used).
add_hotkeys (hotkeys) | Add hotkey descriptions for third-party applications (default widget instance will be used).
add_group_rules (group, data) | Add hotkey group rules for third-party applications (default widget instance will be used).

## Theme variables

beautiful.hotkeys_bg | Hotkeys widget background color.
beautiful.hotkeys_fg | Hotkeys widget foreground color.
beautiful.hotkeys_border_width | Hotkeys widget border width.
beautiful.hotkeys_border_color | Hotkeys widget border color.
beautiful.hotkeys_shape | Hotkeys widget shape.
beautiful.hotkeys_modifiers_fg | Foreground color used for hotkey modifiers (Ctrl, Alt, Super, etc).
beautiful.hotkeys_label_bg | Background color used for miscellaneous labels of hotkeys widget.
beautiful.hotkeys_label_fg | Foreground color used for hotkey groups and other labels.
beautiful.hotkeys_font | Main hotkeys widget font.
beautiful.hotkeys_description_font | Font used for hotkeys' descriptions.
beautiful.hotkeys_group_margin | Margin between hotkeys groups.

## Fields

hide_without_description | Don't show hotkeys without descriptions.
merge_duplicates | Merge hotkey records into one if they have the same modifiers and description.

## Functions

Methods

new ([args])
  Create an instance of widget with hotkeys help.
  - args Configuration options for the widget.
    - hide_without_description boolean Don't show hotkeys without descriptions. (optional)
    - merge_duplicates boolean Merge hotkey records into one if they have the same modifiers and description. (optional)
    - width int Widget width. (optional)
    - height int Widget height. (optional)
    - bg color Widget background color. (optional)
    - fg color Widget foreground color. (optional)
    - border_width int Border width. (optional)
    - border_color color Border color. (optional)
    - shape gears.shape Widget shape. (optional)
    - font string or lgi.Pango.FontDescription Main widget font. (optional)
    - description_font string or lgi.Pango.FontDescription Font used for hotkeys' descriptions. (optional)
    - modifiers_fg color Foreground color used for hotkey modifiers (Ctrl, Alt, Super, etc). (optional)
    - label_bg color Background color used for miscellaneous labels. (optional)
    - label_fg color Foreground color used for group and other labels. (optional)
    - group_margin int Margin between hotkeys groups. (optional)
    - labels table Labels used for displaying human-readable keynames. (optional)
    - group_rules table Rules for showing 3rd-party hotkeys. @see `awful.hotkeys_popup.keys.vim`. (optional)

  ### Returns:

  Widget instance.
widget_instance:show_help ([c[, s[, show_args]]])
  Show popup with hotkeys help.
  - c client Client. (optional)
  - s screen Screen. (optional)
  - show_args Additional arguments.
    - show_awesome_keys boolean Show AwesomeWM hotkeys. When set to `false` only app-specific hotkeys will be shown. (default true)
widget_instance:add_hotkeys (hotkeys)
  Add hotkey descriptions for third-party applications.
  - hotkeys table Table with bindings, see `awful.hotkeys_popup.key.vim` as an example.
widget_instance:add_group_rules (group, data)
  Add hotkey group rules for third-party applications.
  - group string hotkeys group name,
  - data table rule data for the group see `awful.hotkeys_popup.key.vim` as an example.
show_help ([c[, s[, args]]])
  Show popup with hotkeys help (default widget instance will be used).
  - c client Client. (optional)
  - s screen Screen. (optional)
  - args Additional arguments.
    - show_awesome_keys boolean Show AwesomeWM hotkeys. When set to `false` only app-specific hotkeys will be shown. (default true)
add_hotkeys (hotkeys)
  Add hotkey descriptions for third-party applications (default widget instance will be used).
  - hotkeys table Table with bindings, see `awful.hotkeys_popup.key.vim` as an example.
add_group_rules (group, data)
  Add hotkey group rules for third-party applications (default widget instance will be used).
  - group string rule group name,
  - data table rule data for the group see `awful.hotkeys_popup.key.vim` as an example.

## Theme variables

beautiful.hotkeys_bg
  Hotkeys widget background color.

  ### Type:

  - hotkeys_bg color
beautiful.hotkeys_fg
  Hotkeys widget foreground color.

  ### Type:

  - hotkeys_fg color
beautiful.hotkeys_border_width
  Hotkeys widget border width.

  ### Type:

  - hotkeys_border_width int
beautiful.hotkeys_border_color
  Hotkeys widget border color.

  ### Type:

  - hotkeys_border_color color
beautiful.hotkeys_shape
  Hotkeys widget shape.

  ### Type:

  - hotkeys_shape gears.shape (optional)

  ### See also:

  gears.shape
beautiful.hotkeys_modifiers_fg
  Foreground color used for hotkey modifiers (Ctrl, Alt, Super, etc).

  ### Type:

  - hotkeys_modifiers_fg color
beautiful.hotkeys_label_bg
  Background color used for miscellaneous labels of hotkeys widget.

  ### Type:

  - hotkeys_label_bg color
beautiful.hotkeys_label_fg
  Foreground color used for hotkey groups and other labels.

  ### Type:

  - hotkeys_label_fg color
beautiful.hotkeys_font
  Main hotkeys widget font.

  ### Type:

  - hotkeys_font string or lgi.Pango.FontDescription
beautiful.hotkeys_description_font
  Font used for hotkeys' descriptions.

  ### Type:

  - hotkeys_description_font string or lgi.Pango.FontDescription
beautiful.hotkeys_group_margin
  Margin between hotkeys groups.

  ### Type:

  - hotkeys_group_margin int

## Fields

hide_without_description
  Don't show hotkeys without descriptions.
merge_duplicates
  Merge hotkey records into one if they have the same modifiers and description.

generated by LDoc 1.5.0 Last updated 2025-09-26 21:04:17