Added more configuration options
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
import GLib from "gi://GLib";
|
||||
import { openMenu } from "../utils.js";
|
||||
import options from "options";
|
||||
const { format } = options.bar.clock;
|
||||
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+ %a %b %d %I:%M:%S %p"'],
|
||||
const date = Variable(GLib.DateTime.new_now_local(), {
|
||||
poll: [1000, () => GLib.DateTime.new_now_local()],
|
||||
});
|
||||
const time = Utils.derive([date, format], (c, f) => c.format(f) || "");
|
||||
|
||||
const Clock = () => {
|
||||
return {
|
||||
component: Widget.Label({
|
||||
class_name: "clock",
|
||||
label: date.bind(),
|
||||
label: time.bind(),
|
||||
}),
|
||||
isVisible: true,
|
||||
boxClass: "clock",
|
||||
|
||||
Reference in New Issue
Block a user