From e74eb9775b6923da982d6a61bf2ddbfe5f82d5ef Mon Sep 17 00:00:00 2001 From: actionless Date: Wed, 6 Jan 2016 13:20:04 +0100 Subject: [PATCH] feat(awful: titlebar): make tooltips optional --- lib/awful/titlebar.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/awful/titlebar.lua b/lib/awful/titlebar.lua index f93f6437..41ec779b 100644 --- a/lib/awful/titlebar.lua +++ b/lib/awful/titlebar.lua @@ -26,6 +26,9 @@ local titlebar = { widget = {} } +--- Show tooltips when hover on titlebar buttons (defaults to 'true') +titlebar.enable_tooltip = true + local all_titlebars = setmetatable({}, { __mode = 'k' }) -- Get a color for a titlebar, this tests many values from the array and the theme @@ -191,8 +194,10 @@ end function titlebar.widget.button(c, name, selector, action) local ret = imagebox() - ret.tooltip = atooltip({ objects = {ret}, delay_show = 1 }) - ret.tooltip:set_text(name) + if titlebar.enable_tooltip then + ret.tooltip = atooltip({ objects = {ret}, delay_show = 1 }) + ret.tooltip:set_text(name) + end local function update() local img = selector(c)