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

16
widgets/bar/profile.tsx Normal file
View File

@@ -0,0 +1,16 @@
import { bind, Variable } from "astal";
export const Profile = () => {
const profile = Variable("").poll(5000, ["bash", "-c", "asusctl profile -p"]);
return (
<box cssClasses={["pill"]}>
<label
label={bind(profile).as((val) => {
const data = val.split(" ");
return "P: " + data[data.length - 1];
})}
/>
</box>
);
};