mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-05 20:56:33 +05:30
feat(awesomeWM): add cpu temp widget
This commit is contained in:
@ -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()),
|
||||
|
@ -10,4 +10,5 @@ return {
|
||||
gpu = require(... .. ".gpu"),
|
||||
profile = require(... .. ".profile"),
|
||||
systray = require(... .. ".systray"),
|
||||
stats = require(... .. ".stats"),
|
||||
}
|
||||
|
12
pkgs/awesome/awesome/ui/wibar/module/stats.lua
Normal file
12
pkgs/awesome/awesome/ui/wibar/module/stats.lua
Normal 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
|
Reference in New Issue
Block a user