aboutsummaryrefslogtreecommitdiff
path: root/plugins/smallclock.lua
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2022-07-15 06:34:52 +0200
committerGitHub <noreply@github.com>2022-07-15 00:34:52 -0400
commitdfd0a5020fbf5904ca674256ff42510be5e11a48 (patch)
treeb02f25411f3e40a819577ebf2d607fe77a214f65 /plugins/smallclock.lua
parenta1c7102578f166df804bf5dbdbe6aac6810dff2d (diff)
downloadlite-xl-plugins-dfd0a5020fbf5904ca674256ff42510be5e11a48.tar.gz
lite-xl-plugins-dfd0a5020fbf5904ca674256ff42510be5e11a48.zip
Use new `StatusView:add_item` syntax (#117)
Diffstat (limited to 'plugins/smallclock.lua')
-rw-r--r--plugins/smallclock.lua15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/smallclock.lua b/plugins/smallclock.lua
index 7c845d7..e975152 100644
--- a/plugins/smallclock.lua
+++ b/plugins/smallclock.lua
@@ -54,14 +54,13 @@ local function update_time()
end
end
-core.status_view:add_item(
- nil,
- "status:small-clock",
- StatusView.Item.RIGHT,
- function()
+core.status_view:add_item({
+ name = "status:small-clock",
+ alignment = StatusView.Item.RIGHT,
+ get_item = function()
update_time()
return {style.accent, time}
end,
- nil,
- -1
-).separator = core.status_view.separator2
+ position = -1,
+ separator = core.status_view.separator2
+})