diff --git a/tests/examples/awful/placement/compose.lua b/tests/examples/awful/placement/compose.lua index 2ac83427..54641a88 100644 --- a/tests/examples/awful/placement/compose.lua +++ b/tests/examples/awful/placement/compose.lua @@ -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 c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE --- "right" will be replaced by "left" -local f = (awful.placement.right + awful.placement.left) -f(client.focus) + -- "right" will be replaced by "left" + local f = (awful.placement.right + awful.placement.left) + f(client.focus) 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 diff --git a/tests/examples/awful/placement/compose2.lua b/tests/examples/awful/placement/compose2.lua index 7fb40fa1..f1574c48 100644 --- a/tests/examples/awful/placement/compose2.lua +++ b/tests/examples/awful/placement/compose2.lua @@ -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 c = client.gen_fake {x = 220, y = 35, width=40, height=30} --DOC_HIDE --- Simulate Windows 7 "edge snap" (also called aero snap) feature -local axis = "vertically" + -- Simulate Windows 7 "edge snap" (also called aero snap) feature + local axis = "vertically" -local f = awful.placement.scale -+ awful.placement.left -+ (axis and awful.placement["maximize_"..axis] or nil) + local f = awful.placement.scale + + awful.placement.left + + (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 assert(c.x == wa.x and geo.x == wa.x)--DOC_HIDE diff --git a/tests/examples/wibox/widget/checkbox/custom.lua b/tests/examples/wibox/widget/checkbox/custom.lua index e8ce550e..fe1ed686 100644 --- a/tests/examples/wibox/widget/checkbox/custom.lua +++ b/tests/examples/wibox/widget/checkbox/custom.lua @@ -3,33 +3,31 @@ local wibox = require( "wibox" ) --DOC_HIDE local beautiful = require( "beautiful" ) --DOC_HIDE parent:add( --DOC_HIDE - wibox.widget { - checked = true, - color = beautiful.bg_normal, - paddings = 2, - forced_width = 20, --DOC_HIDE - forced_height = 20, --DOC_HIDE - check_shape = function(cr, width, height) - local rs = math.min(width, height) - - cr:move_to( 0 , 0 ) - cr:line_to( rs , 0 ) - cr:move_to( 0 , 0 ) - cr:line_to( 0 , rs ) - cr:move_to( 0 , rs ) - cr:line_to( rs , rs ) - cr:move_to( rs , 0 ) - cr:line_to( rs , rs ) - cr:move_to( 0 , 0 ) - cr:line_to( rs , rs ) - cr:move_to( 0 , rs ) - cr:line_to( rs , 0 ) - end, - check_border_color = "#ff0000", - check_color = "#00000000", - check_border_width = 1, - widget = wibox.widget.checkbox - } - ) --DOC_HIDE - + wibox.widget { + checked = true, + color = beautiful.bg_normal, + paddings = 2, + forced_width = 20, --DOC_HIDE + forced_height = 20, --DOC_HIDE + check_shape = function(cr, width, height) + local rs = math.min(width, height) + cr:move_to( 0 , 0 ) + cr:line_to( rs , 0 ) + cr:move_to( 0 , 0 ) + cr:line_to( 0 , rs ) + cr:move_to( 0 , rs ) + cr:line_to( rs , rs ) + cr:move_to( rs , 0 ) + cr:line_to( rs , rs ) + cr:move_to( 0 , 0 ) + cr:line_to( rs , rs ) + cr:move_to( 0 , rs ) + cr:line_to( rs , 0 ) + end, + check_border_color = "#ff0000", + check_color = "#00000000", + check_border_width = 1, + widget = wibox.widget.checkbox + } +) --DOC_HIDE --DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/progressbar/text.lua b/tests/examples/wibox/widget/progressbar/text.lua index f4ac6a58..dce30f52 100644 --- a/tests/examples/wibox/widget/progressbar/text.lua +++ b/tests/examples/wibox/widget/progressbar/text.lua @@ -4,24 +4,23 @@ local beautiful = require("beautiful") --DOC_HIDE parent:add( --DOC_HIDE - wibox.widget { - { - max_value = 1, - value = 0.5, - forced_height = 20, - forced_width = 100, - paddings = 1, - border_width = 1, - border_color = beautiful.border_color, - widget = wibox.widget.progressbar, - }, - { - text = "50%", - widget = wibox.widget.textbox, - }, - layout = wibox.layout.stack - } - - ) --DOC_HIDE +wibox.widget { + { + max_value = 1, + value = 0.5, + forced_height = 20, + forced_width = 100, + paddings = 1, + border_width = 1, + border_color = beautiful.border_color, + widget = wibox.widget.progressbar, + }, + { + text = "50%", + widget = wibox.widget.textbox, + }, + layout = wibox.layout.stack +} +) --DOC_HIDE --DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/widget/progressbar/vertical.lua b/tests/examples/wibox/widget/progressbar/vertical.lua index d0bc3751..953ae12e 100644 --- a/tests/examples/wibox/widget/progressbar/vertical.lua +++ b/tests/examples/wibox/widget/progressbar/vertical.lua @@ -3,18 +3,17 @@ local wibox = require("wibox") --DOC_HIDE parent:add( --DOC_HIDE - wibox.widget { - { - max_value = 1, - value = 0.33, - widget = wibox.widget.progressbar, - }, - forced_height = 100, - forced_width = 20, - direction = "east", - layout = wibox.container.rotate, - } - - ) --DOC_HIDE +wibox.widget { + { + max_value = 1, + value = 0.33, + widget = wibox.widget.progressbar, + }, + forced_height = 100, + forced_width = 20, + direction = "east", + layout = wibox.container.rotate, +} +) --DOC_HIDE --DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80