2018-09-30 08:12:57 +02:00
|
|
|
--DOC_GEN_IMAGE
|
|
|
|
--DOC_NO_USAGE
|
2019-01-29 19:36:40 +01:00
|
|
|
require("_date") --DOC_HIDE
|
2018-09-30 08:12:57 +02:00
|
|
|
screen[1]._resize {width = 300, height = 75} --DOC_HIDE
|
|
|
|
local awful = {tooltip = require("awful.tooltip"), wibar = require("awful.wibar")} --DOC_HIDE
|
|
|
|
local wibox = { widget = { textclock = require("wibox.widget.textclock") }, --DOC_HIDE
|
|
|
|
layout = { align = require("wibox.layout.align") } } --DOC_HIDE
|
|
|
|
|
|
|
|
local mytextclock = wibox.widget.textclock()
|
|
|
|
|
|
|
|
--DOC_NEWLINE
|
|
|
|
|
|
|
|
local wb = awful.wibar { position = "top" } --DOC_HIDE
|
|
|
|
|
|
|
|
wb:setup { layout = wibox.layout.align.horizontal, --DOC_HIDE
|
|
|
|
nil, nil, mytextclock} --DOC_HIDE
|
|
|
|
|
2019-02-15 17:04:19 +01:00
|
|
|
require("gears.timer").run_delayed_calls_now() --DOC_HIDE the hierarchy is async
|
2018-09-30 08:12:57 +02:00
|
|
|
|
|
|
|
local myclock_t = awful.tooltip { }
|
|
|
|
--DOC_NEWLINE
|
|
|
|
myclock_t:add_to_object(mytextclock)
|
|
|
|
--DOC_NEWLINE
|
|
|
|
mytextclock:connect_signal("mouse::enter", function()
|
|
|
|
myclock_t.text = os.date("Today is %A %B %d %Y\nThe time is %T")
|
|
|
|
end)
|
|
|
|
|
2019-02-15 17:04:19 +01:00
|
|
|
require("gears.timer").run_delayed_calls_now() --DOC_HIDE
|
2018-09-30 08:12:57 +02:00
|
|
|
|
|
|
|
mouse.coords{x=250, y= 10} --DOC_HIDE
|
|
|
|
mouse.push_history() --DOC_HIDE
|
|
|
|
|
|
|
|
assert(myclock_t.wibox and myclock_t.wibox.visible) --DOC_HIDE
|