user config: add time format #307

This commit is contained in:
end-4
2024-03-06 15:27:41 +07:00
parent da338dbc61
commit 239231b5cf
4 changed files with 42 additions and 35 deletions
+3 -3
View File
@@ -34,9 +34,9 @@ const BarClock = () => Widget.Box({
children: [
Widget.Label({
className: 'bar-clock',
label: GLib.DateTime.new_now_local().format("%H:%M"),
setup: (self) => self.poll(5000, label => {
label.label = GLib.DateTime.new_now_local().format("%H:%M");
label: GLib.DateTime.new_now_local().format(userOptions.time.format),
setup: (self) => self.poll(userOptions.time.interval, label => {
label.label = GLib.DateTime.new_now_local().format(userOptions.time.format);
}),
}),
Widget.Label({