Hotkey Descriptions in AwesomeWM

Hotkey Descriptions in AwesomeWM

Apparently I missed the fact that custom keyboard layouts can be added to the hotkey popup by assigning a description and group to them.

It’s as easy as appending the description to your shortcut
awful.key({modkey, "Control", "Shift" }, "Tab", function () awful.spawn("setxkbmap pl") end)
like so:
awful.key({modkey, "Control", "Shift" }, "Tab", function () awful.spawn("setxkbmap pl") end, {description = "set keyboard layout to pl", group = "custom"}),

And there you have it. You can also add other applications to the hotkey popup by following the tutorial in hotkeys_popup/widget.lua and adding the following to your rc.lua:

--Create the rule that we will use to match for the application.
local fire_rule = { class = { "firefox", "Firefox" } }
for group_name, group_data in pairs({
    ["Firefox: tabs"] = { color = "#009F00", rule_any = fire_rule }
}) do
    hotkeys_popup.add_group_rules(group_name, group_data)
end

-- Table with all of our hotkeys
local firefox_keys = {

    ["Firefox: tabs"] = {{
        modifiers = { "Mod1" },
        keys = {
            ["1..9"] = "go to tab"
        }
    }, {
        modifiers = { "Ctrl" },
        keys = {
            t = "new tab",
            w = 'close tab',
            ['Tab'] = "next tab"
        }
    }, {
        modifiers = { "Ctrl", "Shift" },
        keys = {
          ['Tab'] = "previous tab"
        }
    }}
}

hotkeys_popup.add_hotkeys(firefox_keys)