From 8092915e86265edb4ed9d8ed0c28094b12bc68b6 Mon Sep 17 00:00:00 2001 From: mutlusun Date: Fri, 23 Aug 2019 10:08:05 +0200 Subject: [PATCH] [fanspeed_freebsd] Multiple fans are now supported --- README.md | 7 ++++--- widgets/fanspeed_freebsd.lua | 9 ++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a0d553a..ad391b3 100644 --- a/README.md +++ b/README.md @@ -228,12 +228,13 @@ Returns a table with string keys: `${sda total_s}`, `${sda total_kb}`, ### vicious.widget.fanspeed -Provides fanspeed information for specified fan. +Provides fanspeed information for specified fans. Supported platforms: FreeBSD. -* Argument: full `sysctl` string to entry, e.g. `"dev.acpi_ibm.0.fan_speed"` -* Returns speed of specified fan in RPM, `-1` on error (probably wrong string) +* Argument: full `sysctl` string to one or multiple entries, e.g. + `"dev.acpi_ibm.0.fan_speed"` +* Returns speed of specified fan in RPM, `"N/A"` on error (probably wrong string) ### vicious.widgets.fs diff --git a/widgets/fanspeed_freebsd.lua b/widgets/fanspeed_freebsd.lua index b8d1a60..5be26ef 100644 --- a/widgets/fanspeed_freebsd.lua +++ b/widgets/fanspeed_freebsd.lua @@ -4,15 +4,10 @@ local tonumber = tonumber -- }}} --- fanspeed: provides speed level of main fan --- --- expects one (1) full sysctl string to entry --- e.g.: "dev.acpi_ibm.0.fan_speed" - --- fanspeed: provides speed level of main fan +-- fanspeed: provides speed level of fans -- vicious.widgets.fanspeed -- --- expects one (1) full sysctl string to entry +-- expects one or multiple full sysctl strings to entry -- e.g.: "dev.acpi_ibm.0.fan_speed" local fanspeed_freebsd = {}