From dfd0a5020fbf5904ca674256ff42510be5e11a48 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Fri, 15 Jul 2022 06:34:52 +0200 Subject: Use new `StatusView:add_item` syntax (#117) --- plugins/statusclock.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'plugins/statusclock.lua') diff --git a/plugins/statusclock.lua b/plugins/statusclock.lua index 0fe95dd..aec58e3 100644 --- a/plugins/statusclock.lua +++ b/plugins/statusclock.lua @@ -68,11 +68,10 @@ local function update_time() end end -core.status_view:add_item( - nil, - "status:clock", - StatusView.Item.RIGHT, - function(self) +core.status_view:add_item({ + name = "status:clock", + alignment = StatusView.Item.RIGHT, + get_item = function(self) update_time() return { style.text, @@ -83,7 +82,7 @@ core.status_view:add_item( time_data.time_text, } end, - nil, - -1 -).separator = core.status_view.separator2 + position = -1, + separator = core.status_view.separator2 +}) -- cgit v1.2.3