From 762f9ded4bc3b90226f080ac670e50b958e9e9ae Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Thu, 13 Sep 2018 17:23:13 +0200 Subject: [PATCH] Working on todos --- awesome/background_widget.lua | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/awesome/background_widget.lua b/awesome/background_widget.lua index f2338c6..c43ac5c 100644 --- a/awesome/background_widget.lua +++ b/awesome/background_widget.lua @@ -1,5 +1,30 @@ local wibox = require('wibox') local awful = require('awful') +local gears = require('gears') + +function todo_list_widget(s) + + local text = wibox.widget{ + markup = '\n TODO\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) @@ -12,9 +37,11 @@ function add_background_widget(s) local text = wibox.widget.textbox("Hello to you") text.point = { x = 75, y = 200 } + local w = todo_list_widget(s) + background_widget:setup { layout = wibox.layout.manual, - text, + w } background_widget:struts({left=0, right=0, top=0, bottom=0})