This commit is contained in:
Thomas Forgione 2018-09-15 10:55:51 +02:00
parent c339ead212
commit 37ecf108e0
No known key found for this signature in database
GPG Key ID: 3B8FC64F5BBFE109
1 changed files with 34 additions and 30 deletions

View File

@ -37,46 +37,50 @@ end
function add_background_widget(s) function add_background_widget(s)
local f = io.open(todo_path, "rb") awful.spawn.easy_async_with_shell(":", function()
if f ~= nil then local f = io.open(todo_path, "rb")
local content = f:read("*all") if f ~= nil then
f:close()
todo = json.parse(content) local content = f:read("*all")
f:close()
local margin = 25 todo = json.parse(content)
local l = wibox.layout { local margin = 25
homogeneous = true,
spacing = margin,
forced_num_cols = 3,
layout = wibox.layout.grid,
}
l:set_orientation('horizontal') local l = wibox.layout {
homogeneous = true,
spacing = margin,
forced_num_cols = 3,
layout = wibox.layout.grid,
}
local widgets = {} l:set_orientation('horizontal')
local widgets = {}
for key, val in pairs(todo) do
l:add(todo_list_widget(val, s))
end
background_widget = awful.wibar({
screen = s,
height = s.geometry.height,
bg = "#00000000",
})
background_widget:setup {
wibox.container.margin(l, margin, margin, margin, margin),
layout = wibox.layout.manual
}
background_widget:struts({left=0, right=0, top=0, bottom=0})
for key, val in pairs(todo) do
l:add(todo_list_widget(val, s))
end end
background_widget = awful.wibar({ end)
screen = s,
height = s.geometry.height,
bg = "#00000000",
})
background_widget:setup {
wibox.container.margin(l, margin, margin, margin, margin),
layout = wibox.layout.manual
}
background_widget:struts({left=0, right=0, top=0, bottom=0})
end
end end