Add CPU sensor script for polybar status

This commit is contained in:
2019-10-25 15:54:49 -04:00
parent db1c4bc508
commit 1c904a7254
3 changed files with 29 additions and 24 deletions

View File

@@ -209,38 +209,19 @@ interval = 600
; CPU Temp
;;;;;;;;;;;;;;;;;;;;;;;;;;
[module/temp-cpu]
type = internal/temperature
type = custom/script
; Seconds to sleep between updates
; Default: 1
interval = 0.5
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
; Base temperature for where to start the ramp (in degrees celsius)
; Default: 0
base-temperature = 20
; Threshold temperature to display warning label (in degrees celsius)
; Default: 80
warn-temperature = 60
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label =  %temperature-f%
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label-warn = %temperature-f%
label-warn-foreground = #f00
exec = exec ~/.local/bin/i3scripts/cpusensor
format = <label>
tail = true
label =  %output% F°
; GPU Temp
;;;;;;;;;;;;;;;;;;;;;;;;;;