nixos-configs/devices/binto/config/ags/ts/bar/buttons/clock.ts
matt1432 d3bb06a370
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(ags binto): switch to typescript
2024-01-13 16:07:33 -05:00

12 lines
355 B
TypeScript

import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
export default () => Label({ class_name: 'clock' })
.poll(1000, (self) => {
const time = imports.gi.GLib
.DateTime.new_now_local();
self.label = time.format('%a. ') +
time.get_day_of_month() +
time.format(' %b. %H:%M');
});