mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-04 14:20:37 -04:00
21 lines
393 B
JavaScript
21 lines
393 B
JavaScript
const { GLib } = imports.gi;
|
|
class ClockService extends Service {
|
|
static {
|
|
Service.register ( this, {}, {
|
|
'time': ['gobject']
|
|
}
|
|
)
|
|
}
|
|
|
|
#time = GLib.DateTime.new_now_local()
|
|
|
|
get time() { return this.#time; }
|
|
constructor() {
|
|
super()
|
|
Utils.interval(1000, () => {
|
|
this.#time = GLib.DateTime.new_now_local()
|
|
this.changed("time")
|
|
})
|
|
}
|
|
}
|
|
export default new ClockService()
|