mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
screen: export RandR information
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8c87b7cb57
commit
c08b90345f
2 changed files with 15 additions and 0 deletions
|
@ -65,6 +65,7 @@ name
|
|||
ontop
|
||||
opacity
|
||||
orientation
|
||||
outputs
|
||||
pid
|
||||
release
|
||||
resize
|
||||
|
|
14
screen.c
14
screen.c
|
@ -516,6 +516,20 @@ luaA_screen_index(lua_State *L)
|
|||
case A_TK_WORKAREA:
|
||||
luaA_pusharea(L, screen_area_get(s, true));
|
||||
break;
|
||||
case A_TK_OUTPUTS:
|
||||
{
|
||||
lua_createtable(L, 0, s->outputs.len);
|
||||
foreach(output, s->outputs)
|
||||
{
|
||||
lua_createtable(L, 2, 0);
|
||||
lua_pushinteger(L, output->mm_width);
|
||||
lua_setfield(L, -2, "mm_width");
|
||||
lua_pushinteger(L, output->mm_height);
|
||||
lua_setfield(L, -2, "mm_height");
|
||||
lua_setfield(L, -2, output->name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue