Add awesome.startup

This boolean describes if we are still in startup or if our main loop is already
running.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-03-16 20:09:43 +01:00
parent 05ece8c778
commit c46d43faf0
2 changed files with 8 additions and 0 deletions

7
luaa.c
View File

@ -430,6 +430,7 @@ luaA_isloop(lua_State *L, int idx)
* \lfield conffile The configuration file which has been loaded.
* \lfield version The version of awesome.
* \lfield release The release name of awesome.
* \lfield startup True if we are still in startup, false otherwise.
* \lfield startup_errors Error message for errors that occured during startup.
* \lfield composite_manager_running True if a composite manager is running.
*/
@ -459,6 +460,12 @@ luaA_awesome_index(lua_State *L)
return 1;
}
if(A_STREQ(buf, "startup"))
{
lua_pushboolean(L, globalconf.loop == NULL);
return 1;
}
if(A_STREQ(buf, "startup_errors") && globalconf.startup_errors.len != 0)
{
lua_pushstring(L, globalconf.startup_errors.s);

View File

@ -7,6 +7,7 @@ module("awesome")
-- @field version The version of awesome.
-- @field release The release name of awesome.
-- @field conffile The configuration file which has been loaded.
-- @field startup True if we are still in startup, false otherwise.
-- @field startup_errors Error message for errors that occured during startup.
-- @field composite_manager_running True if a composite manager is running.
-- @class table