diff options
author | jgmdev <jgmdev@gmail.com> | 2022-05-24 19:29:50 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-05-24 19:29:50 -0400 |
commit | 35e947d1933613bb0b5a1488bf0fa4587f98ef7d (patch) | |
tree | 07d2515f44db03b1e865f6aef6adfd12b118890b /plugins/bigclock.lua | |
parent | c1f3671e2a8defbc67d1e77c72d5866f2825cdb5 (diff) | |
download | lite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.tar.gz lite-xl-plugins-35e947d1933613bb0b5a1488bf0fa4587f98ef7d.zip |
added config_spec and other plugin compatibility fixes.
Diffstat (limited to 'plugins/bigclock.lua')
-rw-r--r-- | plugins/bigclock.lua | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/plugins/bigclock.lua b/plugins/bigclock.lua index 1f38b02..66b63f1 100644 --- a/plugins/bigclock.lua +++ b/plugins/bigclock.lua @@ -10,7 +10,35 @@ local View = require "core.view" config.plugins.bigclock = common.merge({ time_format = "%H:%M:%S", date_format = "%A, %d %B %Y", - scale = 1 + scale = 1, + -- The config specification used by the settings gui + config_spec = { + name = "Big Clock", + { + label = "Time Format", + description = "Time specification defined with Lua date/time place holders.", + path = "time_format", + type = "string", + default = "%H:%M:%S" + }, + { + label = "Date Format", + description = "Date specification defined with Lua date/time place holders.", + path = "date_format", + type = "string", + default = "%A, %d %B %Y", + }, + { + label = "Scale", + description = "Size of the clock relative to screen.", + path = "scale", + type = "number", + default = 1, + min = 0.5, + max = 3.0, + step = 0.1 + } + } }, config.plugins.bigclock) |