From 48d4a31b171498b00f38d5a0ac7dd82f7ec4a901 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 22 Aug 2018 13:22:51 +0200 Subject: [PATCH] awful.rules: Support titlebars_enabled being a function Signed-off-by: Uli Schlachter --- lib/awful/rules.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/awful/rules.lua b/lib/awful/rules.lua index c652ede31..6bf07d525 100644 --- a/lib/awful/rules.lua +++ b/lib/awful/rules.lua @@ -582,7 +582,8 @@ end -- @tab[opt] callbacks Callbacks to apply. function rules.execute(c, props, callbacks) -- This has to be done first, as it will impact geometry related props. - if props.titlebars_enabled then + if props.titlebars_enabled and (type(props.titlebars_enabled) ~= "function" + or props.titlebars_enabled(c,props)) then c:emit_signal("request::titlebars", "rules", {properties=props}) end