mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-08 10:46:34 +05:30
13 lines
332 B
Lua
13 lines
332 B
Lua
-- Stats widget for Awesome Window Manager
|
|
local watch = require("awful.widget.watch")
|
|
local wibox = require("wibox")
|
|
|
|
local cpu = wibox.widget.textbox("NA")
|
|
watch('bash -c "cat /sys/class/thermal/thermal_zone*/temp"', 10, function(_, stdout)
|
|
cpu.text = "CPU: " .. stdout / 1000 .. " °C"
|
|
end)
|
|
|
|
return function()
|
|
return cpu
|
|
end
|