diff --git a/widgets/bar/cpu.tsx b/widgets/bar/cpu.tsx new file mode 100644 index 0000000..f2d7178 --- /dev/null +++ b/widgets/bar/cpu.tsx @@ -0,0 +1,15 @@ +import { bind, Variable } from "astal"; + +export const CPU = () => { + const cpu = Variable("").poll(5000, [ + "bash", + "-c", + "cat /sys/class/thermal/thermal_zone*/temp", + ]); + + return ( + + + ); +}; diff --git a/widgets/bar/index.tsx b/widgets/bar/index.tsx index 88511a3..16ea1db 100644 --- a/widgets/bar/index.tsx +++ b/widgets/bar/index.tsx @@ -6,6 +6,7 @@ import { Time } from "./time"; import { Network } from "./network"; import { Profile } from "./profile"; import { GPU } from "./gpu"; +import { CPU } from "./cpu"; export const WINDOW_NAME = "bar"; @@ -47,6 +48,7 @@ const End = () => { return ( +