mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 23:34:57 +08:00
awesome: Use CPU-agnostic method of getting temperature
This commit is contained in:
parent
c5431fb7f0
commit
e6b06c8bd2
1 changed files with 1 additions and 8 deletions
|
|
@ -5,16 +5,9 @@ local awful = require("awful")
|
|||
|
||||
local update_interval = 15
|
||||
|
||||
-- Intel CPU
|
||||
-- local temp_script = [[
|
||||
-- sh -c "
|
||||
-- sensors | grep Package | awk '{print $4}' | cut -c 2-3
|
||||
-- "]]
|
||||
|
||||
-- AMD CPU
|
||||
local temp_script = [[
|
||||
sh -c "
|
||||
sensors | sed -n 'x;$p' | awk '{printf(\"%0.1f\", $2)}'
|
||||
head -c -4 /sys/devices/virtual/thermal/thermal_zone0/temp
|
||||
"]]
|
||||
|
||||
-- Periodically get temperature info
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue