From 93b53bcf3f464ecf529a21ebdac52d132cf1602b Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 7 Mar 2017 11:32:17 +0100 Subject: [PATCH] Add some non-helpful examples This makes the scroll and only_on_screen widgets appear in the widget lists. The examples are not really helpful, but Elv13 told me to add them. Also, only_on_screen is in awful.widget, but now something in tests/examples/wibox/container refers to it... Signed-off-by: Uli Schlachter --- .../container/defaults/only_on_screen.lua | 22 +++++++++++++++++++ .../wibox/container/defaults/scroll.lua | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/examples/wibox/container/defaults/only_on_screen.lua create mode 100644 tests/examples/wibox/container/defaults/scroll.lua diff --git a/tests/examples/wibox/container/defaults/only_on_screen.lua b/tests/examples/wibox/container/defaults/only_on_screen.lua new file mode 100644 index 000000000..10e1b3f52 --- /dev/null +++ b/tests/examples/wibox/container/defaults/only_on_screen.lua @@ -0,0 +1,22 @@ +--DOC_HIDE_ALL +local wibox = require("wibox") +local awful = { widget = { only_on_screen = require("awful.widget.only_on_screen") } } + +return { + text = "Before", + align = "center", + valign = "center", + widget = wibox.widget.textbox, +}, +{ + { + text = "After", + align = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + screen = "primary", + widget = awful.widget.only_on_screen +} + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/tests/examples/wibox/container/defaults/scroll.lua b/tests/examples/wibox/container/defaults/scroll.lua new file mode 100644 index 000000000..a7f8b4132 --- /dev/null +++ b/tests/examples/wibox/container/defaults/scroll.lua @@ -0,0 +1,20 @@ +--DOC_HIDE_ALL +local wibox = require("wibox") + +return { + text = "Before", + align = "center", + valign = "center", + widget = wibox.widget.textbox, +}, +{ + { + text = "After", + align = "center", + valign = "center", + widget = wibox.widget.textbox, + }, + widget = wibox.container.scroll.horizontal +} + +--DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80