Files
ags/widget/modules/Cpu/Cpu.tsx
T
2025-03-11 17:51:22 +07:00

17 lines
349 B
TypeScript

import { Variable } from "astal";
import computeCPU from "./helpers";
export default function Cpu() {
const cpu_usage = Variable<string>("").poll(5000, () => computeCPU());
return (
<box className="cpu">
<label
className="Cpu"
onDestroy={() => cpu_usage.drop()}
label={cpu_usage()}
/>
</box>
);
}