feat(awesomeWM): add cpu temp widget

This commit is contained in:
tux
2024-11-27 11:25:34 +05:30
parent 9c85a6c374
commit 1f26bafcda
3 changed files with 14 additions and 0 deletions

View File

@ -62,6 +62,7 @@ return function(s)
{
layout = wibox.layout.fixed.horizontal,
create_capsule_widget(module.profile()),
create_capsule_widget(module.stats()),
create_capsule_widget(module.gpu()),
create_capsule_widget(module.tailscale()),
create_capsule_widget(module.battery()),

View File

@ -10,4 +10,5 @@ return {
gpu = require(... .. ".gpu"),
profile = require(... .. ".profile"),
systray = require(... .. ".systray"),
stats = require(... .. ".stats"),
}

View File

@ -0,0 +1,12 @@
-- 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