22 lines
381 B
TypeScript
22 lines
381 B
TypeScript
import { GLib, Variable } from "astal"
|
|
|
|
const Time = ({ format = "%a, %e.%m %H:%M:%S" }) => {
|
|
const time = Variable<string>("").poll(1000, () =>
|
|
GLib.DateTime.new_now_local().format(format)!)
|
|
|
|
return <label
|
|
className="Time"
|
|
onDestroy={() => time.drop()}
|
|
label={time()}
|
|
/>
|
|
}
|
|
|
|
const Calendar = () => {
|
|
|
|
}
|
|
|
|
|
|
export default {
|
|
Time
|
|
}
|