LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Awesome WM 3.4.1 help (https://www.linuxquestions.org/questions/linux-desktop-74/awesome-wm-3-4-1-help-810852/)

behemoth8186 05-28-2010 10:52 PM

Awesome WM 3.4.1 help
 
I hope this thread is in the right section, if not, mods please move to the correct section.

I'm on Ubuntu (crunchbang actually) 9.04, and I've ventured to the world of the tiling WMs. Specifically, Awesome. I used 2.3.4 for quite a while, but have recently upgraded to 3.4.1. I've managed to get the vicious widgets working to display network, cpu, mem, etc., but the one thing that is driving me crazy is the statusbar icons.

to avoid the tl,dr;

Is there anyway to turn off the program icons in the status bar for the open programs? i.e. terminal, firefox, etc.

Ive googled as well as I can with no luck, and the awesome wiki for this seems to be outdated, as its suggestion bricks my awesome config. Any help is greatly appreciated.

antegallya 05-29-2010 04:48 AM

Hello,

indeed the wiki is outdated for this. AFAIK there's no more option to disable the icons.
But awesome being easily modified :
Let's add that option !
Apply this patch to "/usr/share/awesome/lib/awful/widget/tasklist.lua"
Code:

--- tasklist.old        2010-05-29 11:34:45.816804701 +0200
+++ tasklist.lua        2010-05-29 11:34:45.816804701 +0200
@@ -95,6 +95,10 @@
    local text = "<span font_desc='"..font.."'>"
    local name
    local status_image
+    local c_icon
+    if not args.hide_icon then
+        c_icon = c.icon
+    end
    if client.floating.get(c) and floating_icon then
        status_image = capi.image(floating_icon)
    end
@@ -120,7 +124,7 @@
        text = text .. name
    end
    text = text .. "</span>"
-    return text, bg, status_image, c.icon
+    return text, bg, status_image, c_icon
 end
 
 --- Return labels for a tasklist widget with clients from all tags and screen.

and you should have in your rc.lua something like
Code:

    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(
                    function(c)
                        return awful.widget.tasklist.label.currenttags(c, s)
                    end, mytasklist.buttons)

that you will replace by
Code:

    -- Create a tasklist widget
    mytasklist[s] = awful.widget.tasklist(
                    function(c)
                        return awful.widget.tasklist.label.currenttags(c, s,
                                    { hide_icon = true })
                    end, mytasklist.buttons)

telling it to hide the icons.

Hope this helps.

behemoth8186 05-29-2010 12:49 PM

Thanks for the reply.:)

I'll have to give this a shot tonight. I'll reply and let you know how it goes.

Is there a specific place to place the patch in the file?

antegallya 05-29-2010 12:59 PM

The place to place it is where is has to go. You don't place the patch in the file, you have to apply it.
You can use the "patch" command for that, or understand the notation :
Code:

@@ -95,6 +95,10 @@
    local text = "<span font_desc='"..font.."'>"
    local name
    local status_image
+    local c_icon
+    if not args.hide_icon then
+        c_icon = c.icon
+    end
    if client.floating.get(c) and floating_icon then
        status_image = capi.image(floating_icon)
    end

that tells you to look near line 95 and around that text, add the lines that are marked with '+'.
Code:

@@ -120,7 +124,7 @@
        text = text .. name
    end
    text = text .. "</span>"
-    return text, bg, status_image, c.icon
+    return text, bg, status_image, c_icon
 end

tells you to change the line "return text, bg, status_image, c.icon" by the one marked with the '+'.

behemoth8186 05-29-2010 01:11 PM

Ahhh, understood.

Thanks. :)

behemoth8186 05-29-2010 03:09 PM

Awesome! Worked perfectly.

http://i49.tinypic.com/2rqzjnm.jpg

Thanks for your help!

behemoth8186 05-29-2010 09:55 PM

Mods, please mark this as solved. Thanks to antegallya.


All times are GMT -5. The time now is 08:19 PM.