Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1--DOC_GEN_OUTPUT --DOC_GEN_IMAGE --DOC_HIDE
2local awful = {placement = require("awful.placement")} --DOC_HIDE
3
4--DOC_HIDE no_offscreen is auto-called when startup is true, avoid this.
5awesome.startup = false -- luacheck: globals awesome.startup --DOC_HIDE
6
7local c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE
8c.fullscreen = true --DOC_HIDE
9print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
10awful.placement.no_offscreen(c, {honor_workarea=true, })
11print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
12c:kill() --DOC_HIDE
13
14c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE
15c.fullscreen = true --DOC_HIDE
16print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
17local f = (awful.placement.no_offscreen + awful.placement.skip_fullscreen)
18f(c, {honor_workarea=true, })
19print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
20
21--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
22

After

1--DOC_GEN_OUTPUT --DOC_GEN_IMAGE --DOC_HIDE
2local awful = {placement = require("awful.placement")} --DOC_HIDE
3
4--DOC_HIDE no_offscreen is auto-called when startup is true, avoid this.
5awesome.startup = false -- luacheck: globals awesome.startup --DOC_HIDE
6
7-- using just no_offscreen with honor_workarea:
8local c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE
9c.fullscreen = true --DOC_HIDE
10print("no_offscreen:") --DOC_HIDE
11print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
12awful.placement.no_offscreen(c, {honor_workarea=true, })
13print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
14c:kill() --DOC_HIDE
15
16-- using no_offscreen + skip_fullscreen:
17c = client.gen_fake {x = 0, y = 0, width= screen[1].geometry.width, height=screen[1].geometry.height} --DOC_HIDE
18c.fullscreen = true --DOC_HIDE
19print("no_offscreen + skip_fullscreen:") --DOC_HIDE
20print("Before:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
21local f = (awful.placement.no_offscreen + awful.placement.skip_fullscreen)
22f(c, {honor_workarea=true, })
23print("After:", "x="..c.x..", y="..c.y..", width="..c.width..", height="..c.height) --DOC_HIDE
24
25--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
26

Before

chunk
comment
-- "--"
comment_content "DOC_GEN_OUTPUT --DOC_GEN_IMAGE --DOC_HIDE"
variable_declaration (+22 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
comment
-- "--"
comment_content "DOC_HIDE no_offscreen is auto-called when startup is true, a"...
assignment_statement
variable_list
dot_index_expression
identifier "awesome"
. "."
identifier "startup"
= "="
expression_list
false "false"
comment
-- "--"
comment_content " luacheck: globals awesome.startup --DOC_HIDE"
variable_declaration (+55 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
assignment_statement
variable_list
dot_index_expression
identifier "c"
. "."
identifier "fullscreen"
= "="
expression_list
true "true"
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+21 nodes collapsed)
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
function_call
method_index_expression
identifier "c"
: ":"
identifier "kill"
arguments
( "("
) ")"
comment
-- "--"
comment_content "DOC_HIDE"
assignment_statement (+53 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
assignment_statement
variable_list
dot_index_expression
identifier "c"
. "."
identifier "fullscreen"
= "="
expression_list
true "true"
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
variable_declaration (+26 nodes collapsed)
function_call
identifier "f"
arguments
( "("
identifier "c"
, ","
table_constructor
{ "{"
field
identifier "honor_workarea"
= "="
true "true"
, ","
} "}"
) ")"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
comment
-- "--"
comment_content "DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:"...

After

chunk
comment
-- "--"
comment_content "DOC_GEN_OUTPUT --DOC_GEN_IMAGE --DOC_HIDE"
variable_declaration (+22 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
comment
-- "--"
comment_content "DOC_HIDE no_offscreen is auto-called when startup is true, a"...
assignment_statement
variable_list
dot_index_expression
identifier "awesome"
. "."
identifier "startup"
= "="
expression_list
false "false"
comment
-- "--"
comment_content " luacheck: globals awesome.startup --DOC_HIDE"
comment
-- "--"
comment_content " using just no_offscreen with honor_workarea:"
variable_declaration (+55 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
assignment_statement
variable_list
dot_index_expression
identifier "c"
. "."
identifier "fullscreen"
= "="
expression_list
true "true"
comment
-- "--"
comment_content "DOC_HIDE"
function_call
identifier "print"
arguments
( "("
string
" "\""
string_content "no_offscreen:"
" "\""
) ")"
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+21 nodes collapsed)
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
function_call
method_index_expression
identifier "c"
: ":"
identifier "kill"
arguments
( "("
) ")"
comment
-- "--"
comment_content "DOC_HIDE"
comment
-- "--"
comment_content " using no_offscreen + skip_fullscreen:"
assignment_statement (+53 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
assignment_statement
variable_list
dot_index_expression
identifier "c"
. "."
identifier "fullscreen"
= "="
expression_list
true "true"
comment
-- "--"
comment_content "DOC_HIDE"
function_call
identifier "print"
arguments
( "("
string
" "\""
string_content "no_offscreen + skip_fullscreen:"
" "\""
) ")"
comment
-- "--"
comment_content "DOC_HIDE"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
variable_declaration (+26 nodes collapsed)
function_call
identifier "f"
arguments
( "("
identifier "c"
, ","
table_constructor
{ "{"
field
identifier "honor_workarea"
= "="
true "true"
, ","
} "}"
) ")"
function_call (+56 nodes collapsed)
comment
-- "--"
comment_content "DOC_HIDE"
comment
-- "--"
comment_content "DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:"...