return os.execute(('[ -d "%s" ]'):format(path))
end
+function utils.spawn_terminal(prg, cprop, cb)
+ local join = require("gears.table").join
+ local term_cmd = {terminal}
+ if cprop and cprop.instance then
+ if terminal:match("rxvt") then
+ term_cmd = join(term_cmd, {"-name", cprop.instance})
+ end
+ end
+ awful.spawn(join(term_cmd, {"-e", prg}), cprop, cb)
+end
+
function utils.run_or_kill(prg, cprop, screen)
if not prg then
do return nil end
end
function utils.rules.append(rules)
- awful.rules.rules = awful.util.table.join(awful.rules.rules, rules)
+ awful.rules.rules = gears.table.join(awful.rules.rules, rules)
end
function utils.globalkeys.append(keys)
- globalkeys = awful.util.table.join(globalkeys, keys)
+ globalkeys = gears.table.join(globalkeys, keys)
end
function utils.has_battery()