1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-10-22 12:31:23 +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 -- {{{ Required libraries
local awesome, client, screen, tag = awesome, client, screen, tag 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 gears = require("gears")
local awful = require("awful") local awful = require("awful")
@ -44,17 +44,18 @@ end
-- }}} -- }}}
-- {{{ Autostart windowless processes -- {{{ Autostart windowless processes
local function run_once(cmd) local function run_once(cmd_arr)
findme = cmd for _, cmd in ipairs(cmd_arr) do
firstspace = cmd:find(" ") findme = cmd
if firstspace then firstspace = cmd:find(" ")
findme = cmd:sub(0, firstspace-1) if firstspace then
end findme = cmd:sub(0, firstspace-1)
awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd)) end
awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd))
end
end end
run_once("urxvtd") run_once({ "urxvtd", "unclutter -root" })
run_once("unclutter -root")
-- }}} -- }}}
-- {{{ Variable definitions -- {{{ 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( clientkeys = awful.util.table.join(
awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ), awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client ),
awful.key({ modkey, }, "f", awful.key({ modkey, }, "f",