2025-04-21 09:35:17 +02:00
|
|
|
import { GLib, Variable, } from "astal"
|
2025-04-22 21:10:49 +02:00
|
|
|
import { App, Gtk, Gdk } from "astal/gtk4";
|
2025-04-21 09:35:17 +02:00
|
|
|
|
|
|
|
export default function Time({ }) {
|
|
|
|
const time = Variable<string>("").poll(1000, () => GLib.DateTime.new_now_local().format("%H:%M")!)
|
|
|
|
|
2025-04-22 21:10:49 +02:00
|
|
|
|
2025-04-21 09:35:17 +02:00
|
|
|
return <label
|
|
|
|
cssName="Time"
|
|
|
|
onDestroy={() => time.drop()}
|
2025-04-22 21:10:49 +02:00
|
|
|
label={time()}
|
|
|
|
/>
|
|
|
|
|
2025-04-21 09:35:17 +02:00
|
|
|
}
|
|
|
|
|