Added more configuration options

This commit is contained in:
Jas Singh
2024-07-20 16:21:52 -07:00
parent 29abe55008
commit a480400359
37 changed files with 368 additions and 417 deletions

View File

@@ -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",