screenshots at the root window and screen levels. A call to the
root.content() method will return a screenshot as a Cairo surface of the
entire root window (generally all physical screens). Getting the
screen.content property will return a screenshot as a Cairo surface of the
screen object (generally a physical screen) just as client.content will for
a client object.
Sample usage - the traditional API supported focused client screenshot as:
c = client.focus
if c then
gears.surface(c.content):write_to_png("/path/to/screenshot.png")
end
Similarly, this API extension adds:
s = awful.screen.focused()
if s then
gears.surface(s.content):write_to_png("/path/to/screenshot.png")
end
for the screen class and:
gears.surface(root.content()):write_to_png("/path/to/screenshot.png")
for the root window. Note that the example shows how to get a screenshot
of the focused screen, but this is not a limitation. A lua script could
call it on any screen object.
Signed off by Brian Sobulefsky <brian.sobulefsky@protonmail.com>