globalconf: move conffile out
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8d36fefd15
commit
c036ea5f3e
|
@ -75,8 +75,6 @@ typedef struct
|
|||
client_array_t clients;
|
||||
/** Embedded windows */
|
||||
xembed_window_array_t embedded;
|
||||
/** Path to config file */
|
||||
char *conffile;
|
||||
/** Stack client history */
|
||||
client_array_t stack;
|
||||
/** Lua VM state */
|
||||
|
|
7
luaa.c
7
luaa.c
|
@ -55,6 +55,9 @@ extern const struct luaL_reg awesome_mouse_meta[];
|
|||
extern const struct luaL_reg awesome_screen_methods[];
|
||||
extern const struct luaL_reg awesome_screen_meta[];
|
||||
|
||||
/** Path to config file */
|
||||
static char *conffile;
|
||||
|
||||
/** Quit awesome.
|
||||
* \param L The Lua VM state.
|
||||
* \return The number of elements pushed on stack.
|
||||
|
@ -558,7 +561,7 @@ luaA_awesome_index(lua_State *L)
|
|||
lua_pushnumber(L, globalconf.font->height);
|
||||
break;
|
||||
case A_TK_CONFFILE:
|
||||
lua_pushstring(L, globalconf.conffile);
|
||||
lua_pushstring(L, conffile);
|
||||
break;
|
||||
case A_TK_FG:
|
||||
luaA_pushxcolor(L, globalconf.colors.fg);
|
||||
|
@ -834,7 +837,7 @@ luaA_loadrc(const char *confpath, bool run)
|
|||
fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1));
|
||||
else
|
||||
{
|
||||
globalconf.conffile = a_strdup(confpath);
|
||||
conffile = a_strdup(confpath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue