-function utils.run_or_kill(command)
- -- Check throught the clients if the class match the command
- local lower_command=string.lower(command)
+function utils.is_dir(path)
+ return os.execute(('[ -d "%s" ]'):format(path))
+end
+
+function utils.run_or_kill(prg, cprop, screen)
+ if not prg then
+ do return nil end
+ end
+
+ if not cprop then
+ cprop = { }
+ end
+
+ if not cprop.class then
+ cprop.class = prg
+ end
+
+ if not cprop.instance then
+ cprop.instance = ""
+ end
+
+ cprop.class = string.lower(cprop.class)
+ cprop.instance = string.lower(cprop.instance)
+