dotfiles/awesome/lain/wiki/temp.md
2023-01-20 16:22:46 +01:00

1.1 KiB

Usage

Read here.

Description

Shows the current CPU temperature.

local mytemp = lain.widget.temp()

Input table

Variable Meaning Type Default
timeout Refresh timeout (in seconds) integer 30
tempfile Path of file which stores core temperature value string "/sys/devices/virtual/thermal/thermal_zone0/temp"
settings User settings function empty function
format String format for output string "%.1f"
widget Widget to render function wibox.widget.textbox

settings can use the string coretemp_now, which contains the info retrieved from tempfile, and the table temp_now, which contains an entry for each *temp* file in each directory in the following paths:

/sys/class/devices/virtual/thermal/thermal_zone*
/sys/class/devices/platform/coretemp*/hwmon/hwon*

All values are expressed in Celsius (GNU/Linux standard).

Output table

Variable Meaning Type
widget The widget wibox.widget.textbox
update Update widget function