summaryrefslogtreecommitdiffstats
path: root/src/widgets/temp_linux.go
blob: 99c2a8717ed39b7cf483c9bd8fc3218cbd94aba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package widgets

import (
	psHost "github.com/shirou/gopsutil/host"
)

func (self *Temp) update() {
	sensors, _ := psHost.SensorsTemperatures()
	for _, sensor := range sensors {
		self.Data[sensor.SensorKey] = int(sensor.Temperature)
	}
}