refactor: reorganize components, add interface to network

This commit is contained in:
2025-06-28 01:49:02 -07:00
parent 78ca57e491
commit f6c13e0ec7
9 changed files with 155 additions and 130 deletions

15
astal/widget/time.tsx Normal file
View File

@@ -0,0 +1,15 @@
import { bind, GLib, Variable } from "astal"
let current_time = Variable(GLib.DateTime.new_now_local().format("%H:%M"))
GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, () => {
const now = GLib.DateTime.new_now_local()
current_time.set(now.format("%H:%M"))
return true
})
export default function Time() {
return <box className="status-box">
<label label={bind(current_time)} />
</box>
}