snowflake/home/ags/config/js/widgets/time.js
notohh 36bbb8603a
All checks were successful
flake check / check (push) Successful in 11m1s
fmt check / check (push) Successful in 1m6s
ags: init basic bar
2024-01-01 21:29:18 -05:00

18 lines
No EOL
337 B
JavaScript

import { Widget, Utils } from '../../import.js';
const Time = () => Widget.EventBox({
child: Widget.Label({
className: "date"
}).poll(
1000,
(self) =>
Utils.execAsync(["date", "+%a %b %d %H:%M"]).then((time) =>
self.label = time
),
),
})
export {
Time
}