How to know if client is killed in Awesome WM
-
29-06-2021 - |
题
I'm writing a module and it has local table with a list of filtered clients. When one of clients in table is killed all operations with it raise "client is invalid" exception.
So how can I check if client is killed?
解决方案
Best would be to add a signal for the unmanage
event on every client, you add to your list.
In the signal function you can then delete the client from the list of tables. It could look something like this:
client.add_signal('unmanage', function(c)
-- Remove c from your list
end)
不隶属于 StackOverflow