mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
15 lines
412 B
Lua
15 lines
412 B
Lua
-- Provides:
|
|
-- evil::temperature
|
|
-- temperature (integer - in Celcius)
|
|
local awful = require("awful")
|
|
|
|
local update_interval = 15
|
|
local temp_script = [[
|
|
sh -c "
|
|
sensors | grep Package | awk '{print $4}' | cut -c 2-3
|
|
"]]
|
|
|
|
-- Periodically get temperature info
|
|
awful.widget.watch(temp_script, update_interval, function(widget, stdout)
|
|
awesome.emit_signal("evil::temperature", tonumber(stdout))
|
|
end)
|