Search code examples
luaawesome-wm

How to know if client is killed in Awesome WM


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?


Solution

  • 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)