Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents a cputemp bar module. It supports setting the output format, click handler, update frequency, and urgency/colour functions.
func HwmonOfNameAndLabel ¶
HwmonOfNameAndLabel finds a sensor given hwmon name and label.
For example, if you have /sys/class/hwmon/hwmon4/name containing "k10temp", and /sys/class/hwmon/hwmon4/temp1_label containing "Tctl", the former would be name, and the latter would be label.
func NewDefaultThermal ¶
func NewDefaultThermal() *Module
NewDefaultThermal constructs an instance of the cputemp module for zone type "x86_pkg_temp". Returns nil of the x86_pkg_temp thermal zone is unavailable.
func ThermalOfType ¶
ThermalOfType constructs an instance of the cputemp module for the *first* available sensor of the given type. "x86_pkg_temp" usually represents the temperature of the actual CPU package, while others may be available depending on the system, e.g. "iwlwifi" for wifi, or "acpitz" for the motherboard.
func ThermalZone ¶
ThermalZone constructs an instance of the temperature module for the specified zone. The file /sys/class/thermal/<zone>/temp should return cpu temp in 1/1000 deg C.
func (*Module) Output ¶
Output configures a module to display the output of a user-defined function.
func (*Module) RefreshInterval ¶
RefreshInterval configures the polling frequency for cpu temperatures. Note: updates might still be less frequent if the temperature does not change.