From b54cf0330bd8e1f619b2d2029a807e9f3070e02f Mon Sep 17 00:00:00 2001 From: Lego Stax Date: Sat, 25 Feb 2017 17:21:36 -0700 Subject: [PATCH] Added disable_task_name property style.disable_task_name and beautiful.tasklist_disable_task_name. Suppresses display of a given client's name, but preserves the setting of tasklist_plain_task_name --- lib/awful/widget/tasklist.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/awful/widget/tasklist.lua b/lib/awful/widget/tasklist.lua index fa773c351..304494df1 100644 --- a/lib/awful/widget/tasklist.lua +++ b/lib/awful/widget/tasklist.lua @@ -110,6 +110,10 @@ local instances -- @beautiful beautiful.tasklist_disable_icon -- @tparam[opt=false] boolean tasklist_disable_icon +--- Disable the tasklist client titles. +-- @beautiful beautiful.tasklist_disable_task_name +-- @tparam[opt=false] boolean tasklist_disable_task_name + --- Disable the extra tasklist client property notification icons. -- -- See the Status icons section for more details. @@ -214,6 +218,7 @@ local function tasklist_label(c, args, tb) local bg_image_urgent = args.bg_image_urgent or theme.tasklist_bg_image_urgent or theme.bg_image_urgent local bg_image_minimize = args.bg_image_minimize or theme.tasklist_bg_image_minimize or theme.bg_image_minimize local tasklist_disable_icon = args.tasklist_disable_icon or theme.tasklist_disable_icon or false + local disable_task_name = args.disable_task_name or theme.tasklist_disable_task_name or false local font = args.font or theme.tasklist_font or theme.font or "" local font_focus = args.font_focus or theme.tasklist_font_focus or theme.font_focus or font or "" local font_minimized = args.font_minimized or theme.tasklist_font_minimized or theme.font_minimized or font or "" @@ -254,10 +259,12 @@ local function tasklist_label(c, args, tb) end end - if c.minimized then - name = name .. (util.escape(c.icon_name) or util.escape(c.name) or util.escape("")) - else - name = name .. (util.escape(c.name) or util.escape("")) + if not disable_task_name then + if c.minimized then + name = name .. (util.escape(c.icon_name) or util.escape(c.name) or util.escape("")) + else + name = name .. (util.escape(c.name) or util.escape("")) + end end local focused = capi.client.focus == c @@ -375,6 +382,7 @@ end -- @tparam[opt=nil] string style.bg_image_urgent -- @tparam[opt=nil] string style.bg_image_minimize -- @tparam[opt=nil] boolean style.tasklist_disable_icon +-- @tparam[opt=false] boolean style.disable_task_name -- @tparam[opt=nil] string style.font -- @tparam[opt=left] string style.align *left*, *right* or *center* -- @tparam[opt=nil] string style.font_focus