mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-11 13:21:55 +05:30
17 lines
380 B
TypeScript
17 lines
380 B
TypeScript
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>
|
|
);
|
|
};
|