local host = io.popen("hostname")
utils.host = host:read("*l")
+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
local f = io.popen('ponymix defaults --short')
line = f:read('*l')
f:close()
- return string.match(line, "^sink%s*%d*%s*(.-)%s")
+ return string.match(line, "^sink%s*%d*%s*(.-)%s") or ""
end
function utils.joinTables(t1, t2)