1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 14:05:11 +00:00

fix autostart

This commit is contained in:
Crescent617 2023-07-06 08:57:45 +08:00
parent de15a46696
commit b4f7f23eef

17
rc.lua
View file

@ -63,16 +63,21 @@ end
-- {{{ Autostart windowless processes
-- This function will run once every time Awesome is started
awful.spawn.once(string.format("sh -c 'cd %s && ls | xargs -n1 gio launch'", os.getenv "HOME" .. "/.config/autostart"))
-- awful.spawn.once "picom"
local function run_once(cmd_arr)
for _, cmd in ipairs(cmd_arr) do
awful.spawn.with_shell(string.format("pgrep -fx '%s' > /dev/null || (%s)", cmd, cmd))
end
end
run_once { "compton" } -- comma-separated entries
-- This function implements the XDG autostart specification
--[[
--[
awful.spawn.with_shell(
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
'xrdb -merge <<< "awesome.started:true";' ..
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;'
.. 'xrdb -merge <<< "awesome.started:true";'
-- list each of your autostart commands, followed by ; inside single quotes, followed by ..
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
.. 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
)
--]]