mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 21:01:54 +05:30
feat: add widget for gpu and cpu profile
This commit is contained in:
16
widgets/bar/profile.tsx
Normal file
16
widgets/bar/profile.tsx
Normal 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>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user