Skip to content

Instantly share code, notes, and snippets.

@imabuddha
Last active January 16, 2021 09:21
Show Gist options
  • Save imabuddha/2263407589887d85f29ff5e6c345f0d1 to your computer and use it in GitHub Desktop.
Save imabuddha/2263407589887d85f29ff5e6c345f0d1 to your computer and use it in GitHub Desktop.
by default the Awesome window mgr doesn't run the programs in `~/.config/autostart`

Get Awesome to respect xdg/autostart

See also Arch Wiki for alternatives & other useful awesome tips.

Add the following to ~/.config/awesome/rc.lua:

local xresources_name = "awesome.started"
local xresources = awful.util.pread("xrdb -query")
if not xresources:match(xresources_name) then
    awful.util.spawn_with_shell("xrdb -merge <<< " .. "'" .. xresources_name .. ":true'")
    -- Execute once for X server
    os.execute("dex --environment Awesome --autostart --search-paths $XDG_CONFIG_HOME/autostart")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment