massive update, probably broken
[dotfiles/.git] / .config / awesome / lain / wiki / temp.md
1 ## Usage
2
3 [Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage)
4
5 ### Description
6
7 Shows the current CPU temperature.
8
9 ```lua
10 local mytemp = lain.widget.temp()
11 ```
12
13 ## Input table
14
15 Variable | Meaning | Type | Default
16 --- | --- | --- | ---
17 `timeout` | Refresh timeout (in seconds) | integer | 30
18 `tempfile` | Path of file which stores core temperature value | string | "/sys/devices/virtual/thermal/thermal_zone0/temp"
19 `settings` | User settings | function | empty function
20
21 `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:
22
23 ```shell
24 /sys/class/devices/virtual/thermal/thermal_zone*
25 /sys/class/devices/platform/coretemp*/hwmon/hwon*
26 ```
27
28 All values are expressed in Celsius (GNU/Linux standard).
29
30 ## Output table
31
32 Variable | Meaning | Type
33 --- | --- | ---
34 `widget` | The widget | `wibox.widget.textbox`
35 `update` | Update `widget` | function