feat: add widget for gpu and cpu profile

This commit is contained in:
tux
2025-06-09 06:33:50 +05:30
parent 3e18ba6f82
commit 9b04b5bd9a
3 changed files with 31 additions and 0 deletions

11
widgets/bar/gpu.tsx Normal file
View File

@@ -0,0 +1,11 @@
import { bind, Variable } from "astal";
export const GPU = () => {
const gpu = Variable("").poll(5000, ["bash", "-c", "supergfxctl -g"]);
return (
<box cssClasses={["pill"]}>
<label label={bind(gpu).as((val) => `GPU: ${val}`)} />
</box>
);
};