From 333c5cd31c961dcb599329d7f5713ddf4bc3990c Mon Sep 17 00:00:00 2001 From: actionless Date: Thu, 11 Feb 2016 03:32:11 +0100 Subject: [PATCH] fix(awful: hotkeys): case when description is missing (+prettify) --- lib/awful/hotkeys_popup/widget.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/awful/hotkeys_popup/widget.lua b/lib/awful/hotkeys_popup/widget.lua index a75d478e4..2d01f176d 100644 --- a/lib/awful/hotkeys_popup/widget.lua +++ b/lib/awful/hotkeys_popup/widget.lua @@ -265,9 +265,11 @@ local function create_wibox(s, available_groups) length = length + string.len(modifiers) + 1 -- +1 for "+" character modifiers = markup.fg(widget.modifiers_color, modifiers.."+") end - local hotkey = modifiers .. (key.key or '') - local rendered_hotkey = markup.font(widget.title_font, hotkey.." ") .. - (markup.font(widget.description_font, key.description) or "") + local rendered_hotkey = markup.font(widget.title_font, + modifiers .. (key.key or "") .. " " + ) .. markup.font(widget.description_font, + key.description or "" + ) if length > max_label_width then max_label_width = length max_label_content = rendered_hotkey