The last time this page had a refresh was in parallel with another
massive whole-doc project. Thus, this page still had older
conventions which everything else had already removed.
It also no longer use the master/slave name. In this case, it kinds
of make sense since, for example, of the tag `master_count` is greater
than the number of clients, calling `client.setslave` move the client
to another "master" slot.
Closes#626
There is more into that table than just screens. If `get_by_id` was
called with an invalid notification (or a "future" one in case of
suspended / do_not_disturb), it would explode.
screen.content, and client.content. Run with TESTS_SCREEN_SIZE set equal
to 1280x800. This test suite will be expanded once the more user
friendly awful.screenshot API is merged.
Signed off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
Remove unnecessary function variables width and height, as they do not add any real value, and rather pass these as all other arguments are (such as the connection), giving the routine a uniform look.
Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
thread at PR 3448. PR 3448 involves changes to expand the content
(screenshot) API. Originally, I added both root.content() and and
screen.content to the C source, as client.content has always been
handled. However, screen.content in effect takes a root screenshot and
returns a crop of it. This can just as easily be done through Lua.
When this quick update was implemented in github, the code added to
awful.screen.lua was not quite correct. These changes represent the
debugged version. Users can now call s.content for a screen object, s,
and the screenshot will work transparently.
Signed Off: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
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>