12 lines
273 B
TypeScript
12 lines
273 B
TypeScript
|
import { GLib, Variable, } from "astal"
|
||
|
|
||
|
export default function Time({ }) {
|
||
|
const time = Variable<string>("").poll(1000, () => GLib.DateTime.new_now_local().format("%H:%M")!)
|
||
|
|
||
|
return <label
|
||
|
cssName="Time"
|
||
|
onDestroy={() => time.drop()}
|
||
|
label={time()} />
|
||
|
}
|
||
|
|