nixos-configs/devices/binto/config/ags/js/bar/buttons/clock.js

16 lines
366 B
JavaScript
Raw Normal View History

2023-11-27 15:50:20 -05:00
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
export default () => Label({
className: 'clock',
connections: [[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');
}]],
})