From b67b5c5f43c3eb567b09ca9d59ef42a71b538848 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Sun, 16 Sep 2018 13:09:47 +0200 Subject: [PATCH] Added indices --- awesome/background_widget.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awesome/background_widget.lua b/awesome/background_widget.lua index dfd5b10..4e3b1bc 100644 --- a/awesome/background_widget.lua +++ b/awesome/background_widget.lua @@ -8,12 +8,12 @@ local json = require('jsonutils') local home = os.getenv('HOME') local todo_path = home .. '/.config/todo/todo.json' -function todo_list_widget(todo, s) +function todo_list_widget(index, todo, s) - local text = '\n ' .. todo.title .. ' \n' + local text = '\n ' .. index .. '. ' .. todo.title .. ' \n' for key, item in pairs(todo.items) do - text = text .. ' - ' .. item .. ' \n' + text = text .. ' ' .. key .. '. ' .. item .. ' \n' end local text = wibox.widget { @@ -62,7 +62,7 @@ function add_background_widget(s) local widgets = {} for key, val in pairs(todo) do - l:add(todo_list_widget(val, s)) + l:add(todo_list_widget(key, val, s)) end background_widget = awful.wibar({