doc: Fix some example tests indentation
When `DOC_NO_USAGE` is set, the examples need 4 spaces as per the markdown spec.
This commit is contained in:
parent
790d2aa6ee
commit
767cda5830
|
@ -2,9 +2,9 @@ screen[1]._resize {x = 175, width = 128, height = 96} --DOC_NO_USAGE --DOC_HIDE
|
||||||
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
local c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE
|
local c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE
|
||||||
|
|
||||||
-- "right" will be replaced by "left"
|
-- "right" will be replaced by "left"
|
||||||
local f = (awful.placement.right + awful.placement.left)
|
local f = (awful.placement.right + awful.placement.left)
|
||||||
f(client.focus)
|
f(client.focus)
|
||||||
|
|
||||||
local sg = screen[1].geometry--DOC_HIDE
|
local sg = screen[1].geometry--DOC_HIDE
|
||||||
assert(c.x == sg.x and c.y==sg.height/2-30/2-c.border_width--DOC_HIDE
|
assert(c.x == sg.x and c.y==sg.height/2-30/2-c.border_width--DOC_HIDE
|
||||||
|
|
|
@ -2,14 +2,14 @@ screen[1]._resize {x = 175, width = 128, height = 96} --DOC_NO_USAGE --DOC_HIDE
|
||||||
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
local awful = {placement = require("awful.placement")} --DOC_HIDE
|
||||||
local c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE
|
local c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE
|
||||||
|
|
||||||
-- Simulate Windows 7 "edge snap" (also called aero snap) feature
|
-- Simulate Windows 7 "edge snap" (also called aero snap) feature
|
||||||
local axis = "vertically"
|
local axis = "vertically"
|
||||||
|
|
||||||
local f = awful.placement.scale
|
local f = awful.placement.scale
|
||||||
+ awful.placement.left
|
+ awful.placement.left
|
||||||
+ (axis and awful.placement["maximize_"..axis] or nil)
|
+ (axis and awful.placement["maximize_"..axis] or nil)
|
||||||
|
|
||||||
local geo = f(client.focus, {honor_workarea=true, to_percent = 0.5})
|
local geo = f(client.focus, {honor_workarea=true, to_percent = 0.5})
|
||||||
|
|
||||||
local wa = screen[1].workarea--DOC_HIDE
|
local wa = screen[1].workarea--DOC_HIDE
|
||||||
assert(c.x == wa.x and geo.x == wa.x)--DOC_HIDE
|
assert(c.x == wa.x and geo.x == wa.x)--DOC_HIDE
|
||||||
|
|
|
@ -11,7 +11,6 @@ parent:add( --DOC_HIDE
|
||||||
forced_height = 20, --DOC_HIDE
|
forced_height = 20, --DOC_HIDE
|
||||||
check_shape = function(cr, width, height)
|
check_shape = function(cr, width, height)
|
||||||
local rs = math.min(width, height)
|
local rs = math.min(width, height)
|
||||||
|
|
||||||
cr:move_to( 0 , 0 )
|
cr:move_to( 0 , 0 )
|
||||||
cr:line_to( rs , 0 )
|
cr:line_to( rs , 0 )
|
||||||
cr:move_to( 0 , 0 )
|
cr:move_to( 0 , 0 )
|
||||||
|
@ -30,6 +29,5 @@ parent:add( --DOC_HIDE
|
||||||
check_border_width = 1,
|
check_border_width = 1,
|
||||||
widget = wibox.widget.checkbox
|
widget = wibox.widget.checkbox
|
||||||
}
|
}
|
||||||
) --DOC_HIDE
|
) --DOC_HIDE
|
||||||
|
|
||||||
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -4,7 +4,7 @@ local beautiful = require("beautiful") --DOC_HIDE
|
||||||
|
|
||||||
parent:add( --DOC_HIDE
|
parent:add( --DOC_HIDE
|
||||||
|
|
||||||
wibox.widget {
|
wibox.widget {
|
||||||
{
|
{
|
||||||
max_value = 1,
|
max_value = 1,
|
||||||
value = 0.5,
|
value = 0.5,
|
||||||
|
@ -20,8 +20,7 @@ parent:add( --DOC_HIDE
|
||||||
widget = wibox.widget.textbox,
|
widget = wibox.widget.textbox,
|
||||||
},
|
},
|
||||||
layout = wibox.layout.stack
|
layout = wibox.layout.stack
|
||||||
}
|
}
|
||||||
|
|
||||||
) --DOC_HIDE
|
|
||||||
|
|
||||||
|
) --DOC_HIDE
|
||||||
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
|
@ -3,7 +3,7 @@ local wibox = require("wibox") --DOC_HIDE
|
||||||
|
|
||||||
parent:add( --DOC_HIDE
|
parent:add( --DOC_HIDE
|
||||||
|
|
||||||
wibox.widget {
|
wibox.widget {
|
||||||
{
|
{
|
||||||
max_value = 1,
|
max_value = 1,
|
||||||
value = 0.33,
|
value = 0.33,
|
||||||
|
@ -13,8 +13,7 @@ parent:add( --DOC_HIDE
|
||||||
forced_width = 20,
|
forced_width = 20,
|
||||||
direction = "east",
|
direction = "east",
|
||||||
layout = wibox.container.rotate,
|
layout = wibox.container.rotate,
|
||||||
}
|
}
|
||||||
|
|
||||||
) --DOC_HIDE
|
|
||||||
|
|
||||||
|
) --DOC_HIDE
|
||||||
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue