You are not logged in.

#1 2013-09-01 09:15:21

phairland
Member
Registered: 2013-08-24
Posts: 15

How can I have only icons of apps tasklist in Awesome wm ver 3.5?

In Awesome 3.4 I it was possible to do this by modifying this line:

mytasklist[s] = awful.widget.tasklist(function(c)
  local task = { awful.widget.tasklist.label.currenttags(c, s) }
  return '', task[2], task[3], task[4]
end, mytasklist.buttons)

This would remove the title of the applications and leave only the icons, but in 3.5 that doesn't work anymore.

Offline

#2 2013-09-02 00:03:32

diiis
Member
Registered: 2012-06-06
Posts: 33

Re: How can I have only icons of apps tasklist in Awesome wm ver 3.5?

In awesome 3.5 this doesn't work anymore since label functions (as the anonymous function in your modified line) were replaced with filter functions which work differently. From a user's point of view (i.e. by only modifying rc.lua and theme.lua) I don't see a possibility to change or remove the tasklist text. If you really want this, one quick (and somewhat dirty) solution would be to modify the tasklist file and adding an option to toggle this in your theme file:

--- a/usr/share/awesome/lib/awful/widget/tasklist.lua
+++ b/usr/share/awesome/lib/awful/widget/tasklist_no_names.lua
@@ -61,10 +61,12 @@ local function tasklist_label(c, args)
         if c.maximized_vertical then name = name .. maximized_vertical end
     end
 
-    if c.minimized then
-        name = name .. (util.escape(c.icon_name) or util.escape(c.name) or util.escape("<untitled>"))
-    else
-        name = name .. (util.escape(c.name) or util.escape("<untitled>"))
-    end
+    if theme.tasklist_show_names then
+        if c.minimized then
+            name = name .. (util.escape(c.icon_name) or util.escape(c.name) or util.escape("<untitled>"))
+        else
+            name = name .. (util.escape(c.name) or util.escape("<untitled>"))
+        end
+    end
     if capi.client.focus == c then
         bg = bg_focus
+++ theme.lua
+ theme.tasklist_show_names = false

Don't forget to merge the .pacnew file when updating awesome.

Offline

#3 2013-09-02 15:41:04

phairland
Member
Registered: 2013-08-24
Posts: 15

Re: How can I have only icons of apps tasklist in Awesome wm ver 3.5?

Thanks. it works.

Offline

Board footer

Powered by FluxBB