[lua] Fall back to default config file
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
19534c0bfc
commit
244a02b2d6
|
@ -59,6 +59,7 @@
|
||||||
#include "common/version.h"
|
#include "common/version.h"
|
||||||
#include "common/configopts.h"
|
#include "common/configopts.h"
|
||||||
#include "common/xutil.h"
|
#include "common/xutil.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
bool running = true;
|
bool running = true;
|
||||||
|
|
||||||
|
@ -379,7 +380,13 @@ main(int argc, char **argv)
|
||||||
if(!confpath)
|
if(!confpath)
|
||||||
confpath = config_file();
|
confpath = config_file();
|
||||||
if(!luaA_parserc(confpath))
|
if(!luaA_parserc(confpath))
|
||||||
eprint("failed to load/parse configuration file %s", confpath);
|
{
|
||||||
|
const char *default_confpath = AWESOME_CONF_PATH "/awesomerc.lua";
|
||||||
|
warn("failed to load/parse configuration file %s", confpath);
|
||||||
|
warn("falling back to: %s", default_confpath);
|
||||||
|
if(!luaA_parserc(default_confpath))
|
||||||
|
eprint("failed to load any configuration file");
|
||||||
|
}
|
||||||
|
|
||||||
/* select for events */
|
/* select for events */
|
||||||
const uint32_t change_win_vals[] =
|
const uint32_t change_win_vals[] =
|
||||||
|
|
Loading…
Reference in New Issue