0

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?

C. M
  • 3
  • 6

2 Answers2

0

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

  • Thank you. `client.connect_signal("focus", function(c) if awful.layout.getname() == "fullscreen" then awful.titlebar.hide(client.focus) end end) tag.connect_signal("property::activated", function(t) if awful.layout.getname() == "fullscreen" then awful.titlebar.hide(client.focus) end end) tag.connect_signal("property::selected", function(t) if awful.layout.getname() == "fullscreen" then awful.titlebar.hide(client.focus) ` I tried adding your suggested Signals, but the focused client still has a titlebar on only a tag change – C. M Dec 26 '22 at 13:05
0

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

zsytssk
  • 702
  • 1
  • 6
  • 14