Question

How to propose several rc files to awesome so it doesn't crash?

The idea is to have a rescue rc file in addition to the normal rc file. The rescue file is read, only if the normal one failed (so awesome doesn't crash during a restart).

What I thought is to make awesome load the normal rc file via require. Then check if all is OK, awesome won't crash. If it will, then load the rescue rc file.

My problem is that I don't know how to check that all is OK.

Note: I already use the restart function from awful.utils so no restart is attempted when the syntax of the rc file is wrong.

Was it helpful?

Solution

awesome first looks for a config in your home directory ~/.config/awesome/rc.lua. When that config does not exist or fails /etc/xdg/awesome/rc.lua is loaded. There's your answer already.

I find that configuring awesome using Xephyr works best. In one terminal create a nested X Xephyr :1, in another terminal run awesome on that display:

export DISPLAY=:1
awesome

awesome can also use an alternative config using the -c or --config option:

awesome -c /path/to/config.lua
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top