Files
tpanel/widgets/bar/profile.tsx
2025-06-09 20:20:32 +05:30

18 lines
429 B
TypeScript

import { bind, Variable } from "astal";
export const Profile = () => {
const profile = Variable("").poll(5000, ["bash", "-c", "asusctl profile -p"]);
return (
<box cssClasses={["pill"]} spacing={5}>
<image iconName="fa-speed-symbolic" />
<label
label={bind(profile).as((val) => {
const data = val.split(" ");
return data[data.length - 1];
})}
/>
</box>
);
};