diff --git a/common/tokenize.gperf b/common/tokenize.gperf index 6c45bec9..d5ef9be9 100644 --- a/common/tokenize.gperf +++ b/common/tokenize.gperf @@ -17,6 +17,7 @@ client color Control coords +conffile Ctrl east ellipsize diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 39ec5127..18070fb3 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -128,7 +128,7 @@ end -- If it's not ok, the error will be returned. -- @return Never return if awesome restart, or return a string error. function restart() - local c = checkfile(capi.awesome.conffile()) + local c = checkfile(capi.awesome.conffile) if type(c) ~= "function" then return c diff --git a/luaa.c b/luaa.c index 3c782e1e..95863300 100644 --- a/luaa.c +++ b/luaa.c @@ -166,19 +166,6 @@ luaA_font_set(lua_State *L) return 0; } -/** Get configuration file path used by awesome. - * \param L The Lua VM state. - * \return The number of elements pushed on stack. - * \luastack - * \lreturn The awesome configuration file path. - */ -static int -luaA_conffile(lua_State *L) -{ - lua_pushstring(L, globalconf.conffile); - return 1; -} - /** Set default colors. * \param L The Lua VM state. * \return The number of elements pushed on stack. @@ -748,6 +735,9 @@ luaA_mouse_add(lua_State *L) /** awesome global table. * \param L The Lua VM state. * \return The number of elements pushed on stack. + * \luastack + * \lfield font The default font. + * \lfield conffile The configuration file which has been loaded. */ static int luaA_awesome_index(lua_State *L) @@ -767,6 +757,9 @@ luaA_awesome_index(lua_State *L) g_free(font); } break; + case A_TK_CONFFILE: + lua_pushstring(L, globalconf.conffile); + break; default: return 0; } @@ -831,7 +824,6 @@ luaA_init(void) { "font_set", luaA_font_set }, { "colors_set", luaA_colors_set }, { "colors", luaA_colors }, - { "conffile", luaA_conffile }, { "__index", luaA_awesome_index }, { "__newindex", luaA_awesome_newindex }, /* deprecated */