feat: move status-bar to seperate repository, initial commit

This commit is contained in:
2025-09-24 21:11:28 -07:00
commit 68142eac7c
24 changed files with 664 additions and 0 deletions

16
widget/ram.tsx Normal file
View File

@@ -0,0 +1,16 @@
import { bind, GLib, Variable } from "astal"
import { get_ram_info } from "./cpu"
let info = Variable(get_ram_info())
GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, () => {
info.set(get_ram_info())
return true
})
export default function Ram() {
return <box className="status-box">
<label label={bind(info).as((i) => `${Math.round((i.used / i.total) * 100)}% `)} />
</box>
}