Awesome WM - change titlebar on layout change

232 Views Asked by At

i am trying to remove the titlebar in Awesome wm 4.3 when the layout changes (in my case) to "max.fullscreen":

client.connect_signal("focus", function(c)
    if awful.layout.getname() == "fullscreen" then
        awful.titlebar.hide(c)
    end
end)

I have tried connecting several signals (focus, manage, list, screen::change) to hide the titlebar, but the currently focused window keeps the titlebar on a layout change.

Every other window I change after that has no titlbar.

Is there any other way (or signal) to modify the currently focused window (properties) on a layout-change?

2

There are 2 best solutions below

1
Emmanuel Lepage Vallee On

try using client.focus instead of c in your code and also connect to some tag signals like "property::activated" and "property::selected".

0
zsytssk On

you can use script like this:

tag.connect_signal("property::layout", function(t)
    if awful.layout.getname() == "fullscreen" then
        for _, client in ipairs(t:clients()) do
            awful.titlebar.hide(client)
        end
    else
        for _, client in ipairs(t:clients()) do
            awful.titlebar.show(client)
        end
    end
end)

you can find awesome tag list all clients api from this https://awesomewm.org/apidoc/core_components/tag.html#clients