I'm on 3.4.8

This is what I want? (in tasklist.lua)


function new(label, buttons)
    local w = {
        layout = layout.horizontal.flex
    }
    local widgets = { }
    widgets.imagebox = { }
    widgets.textbox  = { margin    = { left  = 2,
                                       right = 2 },
                         bg_resize = true,
                         bg_align  = "right"
                       }
    local data = setmetatable({}, { __mode = 'kv' })
    local u = function () tasklist_update(w, buttons, label, data, widgets) end
    for s = 1, capi.screen.count() do
        tag.attached_add_signal(s, "property::selected", u)
        capi.screen[s]:add_signal("tag::attach", u)
        capi.screen[s]:add_signal("tag::detach", u)
    end
    capi.client.add_signal("new", function (c)
        c:add_signal("property::urgent", u)
        c:add_signal("property::floating", u)
        c:add_signal("property::maximized_horizontal", u)
        c:add_signal("property::maximized_vertical", u)
        c:add_signal("property::name", u)
        c:add_signal("property::icon_name", u)
        c:add_signal("property::icon", u)
        c:add_signal("property::skip_taskbar", u)
        c:add_signal("property::hidden", u)
        c:add_signal("tagged", u)
        c:add_signal("untagged", u)
    end)
    capi.client.add_signal("unmanage", u)
    capi.client.add_signal("list", u)
    capi.client.add_signal("focus", u)
    capi.client.add_signal("unfocus", u)
    u()
    return w
end


On Wed, Jan 5, 2011 at 4:16 AM, Uli Schlachter <[email protected]> wrote:
> Am 05.01.2011 10:55, beo wulf wrote:
>>
>> Where in awesome is the handler for when a window title change event
>> occurs? (The flicker at the top of the screen bothers me; and I want
>> windows to just have their original title and not change even when
>> they require title changes).
>
> Uhm, what do you mean with "where"? Where in lua, where in C, how does it
> all work?
>
> When a client changes its window title, awesome will receive a
> PropertyNotify that says so. Via some magic in event.c and property.c, this
> ends up in calls to client_set_name() (_NET_WM_NAME), client_set_alt_name()
> (WM_NAME), client_set_alt_icon_name() (WM_ICON_NAME), and
> client_set_icon_name() (_NET_WM_ICON_NAME) (yes, there are a lot of
> properties for the name, you are most likely interested in _NET_WM_NAME /
> client_set_name()).
>
> All the above mentioned client_* functions are generated via the C
> Preprocessor. Each of them first updates the property of our internal
> representation of the client and then emits the property::name,
> property::alt_name (etc) signal on the client.
>
> These signals then cause the tasklist to be updated.
> awful.widget.tasklist.new() does this via
> client.connect_signal("property::name", u) where u is a function that
> updates the tasklist. This is in git/master. In the 3.4 branch we register
> via the individual clients via the "new" signal.
>
> Anyway, it is possible to re-set the old name of the client when it changes.
> However, I'd first like to know which version of awesome you are using,
> because there are some simplifications on git/master and I'm a little short
> on time right now.
>
> Cheers,
> Uli
>
> --
> To unsubscribe, send mail to [email protected].
>

-- 
To unsubscribe, send mail to [email protected].

Reply via email to