1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-22 11:12:31 +00:00

template: run_once argument is now an array

This commit is contained in:
copycat-killer 2017-02-05 13:10:00 +01:00
parent 77ca4f0813
commit afde62ab4b

View file

@ -8,7 +8,7 @@
-- {{{ Required libraries
local awesome, client, screen, tag = awesome, client, screen, tag
local pairs, string, os, table, tostring, tonumber, type = pairs, string, os, table, tostring, tonumber, type
local ipairs, string, os, table, tostring, tonumber, type = ipairs, string, os, table, tostring, tonumber, type
local gears = require("gears")
local awful = require("awful")
@ -44,7 +44,8 @@ end
-- }}}
-- {{{ Autostart windowless processes
local function run_once(cmd)
local function run_once(cmd_arr)
for _, cmd in ipairs(cmd_arr) do
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
@ -52,9 +53,9 @@ local function run_once(cmd)
end
awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd))
end
end
run_once("urxvtd")
run_once("unclutter -root")
run_once({ "urxvtd", "unclutter -root" })
-- }}}
-- {{{ Variable definitions
@ -450,14 +451,6 @@ globalkeys = awful.util.table.join(
--]]
)
clientkeys = {}
function clientkey(mod, key, func, desc)
local key = awful.key(mod, key, func, desc)
for k,v in pairs(key) do
tinsert(clientkeys, v)
end
end
clientkeys = awful.util.table.join(
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ),
awful.key({ modkey, }, "f",