I'm trying to toggle all the titlebars when I press some keys. For this I want to iterate over all clients. I tries to do it several ways, including:
for s in screen do
for c in s.clients do
awful.titlebar.toggle(c)
end
end
and
for c in client.get() do
awful.titlebar.toggle(c)
end
Every time this code it executed I get an error: for iterator 'for iterator' is not callable (a table value)
.
This makes no sense to me. Can you explain why this happens and how to solve my problem?
I am running Awesome 4.3 with Lua 5.4.3.
Also, if you have an elegant way of toggling the titlebars that also impacts new clients, I'm taking. Thanks.
edit: I'd like to precise that the error occurs even without awful.titlebar.toggle(c)
in the for-loops