]> git.rmz.io Git - dotfiles.git/blob - awesome/utils.lua
replace pavucontrol with kmix
[dotfiles.git] / awesome / utils.lua
1 local utils = { }
2
3 function utils.run_or_kill(command)
4 -- Check throught the clients if the class match the command
5 local lower_command=string.lower(command)
6 for k, c in pairs(client.get()) do
7 local class=string.lower(c.class)
8 if string.match(class, lower_command) then
9 for i, v in ipairs(c:tags()) do
10 c:kill()
11 return
12 end
13 end
14 end
15 awful.util.spawn(command)
16 end
17
18 return utils