local utils = { } local host = io.popen("hostname") utils.host = host:read("*l") function utils.run_or_kill(command) -- Check throught the clients if the class match the command local lower_command=string.lower(command) for k, c in pairs(client.get()) do local class=string.lower(c.class) if string.match(class, lower_command) then for i, v in ipairs(c:tags()) do c:kill() return end end end awful.util.spawn(command) end return utils