Files
ags/widget/modules/Time/Time.tsx
T
2025-03-13 15:21:36 +07:00

13 lines
324 B
TypeScript

import { Variable, GLib } from "astal"
export default function Time({ format = "%A %e, %H:%M" }) {
const time = Variable<string>("").poll(1000, () =>
GLib.DateTime.new_now_local().format(format)!)
return <label
className="Time"
onDestroy={() => time.drop()}
label={time()}
/>
}