From 4be58fb298d767f17b3caebe30a4eaa4603441d4 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 4 Mar 2019 22:47:36 -0500 Subject: [PATCH] naughty: Add an `icon_only` property to the action object. --- lib/naughty/action.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/naughty/action.lua b/lib/naughty/action.lua index 28e0de03..6d871da1 100644 --- a/lib/naughty/action.lua +++ b/lib/naughty/action.lua @@ -43,6 +43,10 @@ local action = {} -- @property icon -- @tparam gears.surface|string icon +--- If the action should hide the label and only display the icon. +-- @property icon_only +-- @param[opt=false] boolean + --- The notification. -- @property notification -- @tparam naughty.notification notification @@ -80,7 +84,7 @@ function action:set_position(value) --TODO make sure the position is unique end -for _, prop in ipairs { "name", "icon", "notification" } do +for _, prop in ipairs { "name", "icon", "notification", "icon_only" } do action["get_"..prop] = function(self) return self._private[prop] end