Working on todos

This commit is contained in:
Thomas Forgione 2018-09-13 17:23:13 +02:00
parent 1f26d560fe
commit 762f9ded4b
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 28 additions and 1 deletions

View File

@ -1,5 +1,30 @@
local wibox = require('wibox') local wibox = require('wibox')
local awful = require('awful') local awful = require('awful')
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
function add_background_widget(s) function add_background_widget(s)
@ -12,9 +37,11 @@ function add_background_widget(s)
local text = wibox.widget.textbox("Hello to you") local text = wibox.widget.textbox("Hello to you")
text.point = { x = 75, y = 200 } text.point = { x = 75, y = 200 }
local w = todo_list_widget(s)
background_widget:setup { background_widget:setup {
layout = wibox.layout.manual, layout = wibox.layout.manual,
text, w
} }
background_widget:struts({left=0, right=0, top=0, bottom=0}) background_widget:struts({left=0, right=0, top=0, bottom=0})