Files
ags/widget/modules/Time.tsx
T
2025-03-10 21:51:05 +07:00

12 lines
324 B
TypeScript

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