2018-09-13 16:54:24 +02:00
|
|
|
local wibox = require('wibox')
|
|
|
|
local awful = require('awful')
|
2018-09-13 17:23:13 +02:00
|
|
|
local gears = require('gears')
|
|
|
|
|
|
|
|
function todo_list_widget(s)
|
|
|
|
|
|
|
|
local text = wibox.widget{
|
|
|
|
markup = '\n <b>TODO</b>\n - Hello',
|
|
|
|
align = 'left',
|
|
|
|
valign = 'top',
|
|
|
|
font = "Ubuntu 20",
|
|
|
|
widget = wibox.widget.textbox
|
|
|
|
}
|
|
|
|
|
|
|
|
local widget = wibox.widget.background(text, "#000000aa", function(cr, width, height)
|
|
|
|
gears.shape.rounded_rect(cr, width, height, 20)
|
|
|
|
end)
|
|
|
|
|
|
|
|
widget.shape_border_width = 1
|
|
|
|
widget.shape_border_color = "#ffffff"
|
|
|
|
widget.forced_width = 500
|
|
|
|
widget.forced_height = 500
|
|
|
|
widget.point = { x = 20, y = 30 }
|
|
|
|
|
|
|
|
return widget
|
|
|
|
|
|
|
|
end
|
2018-09-13 16:54:24 +02:00
|
|
|
|
|
|
|
function add_background_widget(s)
|
|
|
|
|
|
|
|
background_widget = awful.wibar({
|
|
|
|
screen = s,
|
|
|
|
height = s.geometry.height,
|
|
|
|
bg = "#00000000",
|
|
|
|
})
|
|
|
|
|
|
|
|
local text = wibox.widget.textbox("Hello to you")
|
|
|
|
text.point = { x = 75, y = 200 }
|
|
|
|
|
2018-09-13 17:23:13 +02:00
|
|
|
local w = todo_list_widget(s)
|
|
|
|
|
2018-09-13 16:54:24 +02:00
|
|
|
background_widget:setup {
|
|
|
|
layout = wibox.layout.manual,
|
2018-09-13 17:23:13 +02:00
|
|
|
w
|
2018-09-13 16:54:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
background_widget:struts({left=0, right=0, top=0, bottom=0})
|
|
|
|
|
|
|
|
end
|