From 77a331e1818bcc7d9ec84f480574c656b310f368 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 12 Jun 2013 23:21:08 +0200 Subject: [PATCH] fix kmix spawning when steam games are running --- awesome/utils.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/awesome/utils.lua b/awesome/utils.lua index f534770..e97aa22 100644 --- a/awesome/utils.lua +++ b/awesome/utils.lua @@ -1,6 +1,5 @@ local utils = { } - local host = io.popen("hostname") utils.host = host:read("*l") @@ -8,11 +7,14 @@ 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 + -- apparently some steam games don't have a client class + if c.class ~= nil then + 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 end -- 2.48.1