move ac widget to match new layout

This commit is contained in:
Jörg Thalheim 2017-01-25 19:42:04 +01:00
parent 57d847301f
commit 387ab4a8b1
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA
2 changed files with 12 additions and 7 deletions

View File

@ -28,12 +28,17 @@ could also depend on Lua libraries that are not distributed with the
core Lua distribution. Ease of installation and use does not
necessarily have to apply to contributed widgets.
vicious.contrib.ac
- provide status about the power supply (AC)
- takes the AC device as an argument, i.e "AC" or "ACAD"
- the device is linked under /sys/class/power_supply/ and should
**vicious.contrib.ac**
Provide status about the power supply (AC)
Supported platforms: Linux (required tools: `sysfs`)
- Arguments:
* takes the AC device as an argument, i.e "AC" or "ACAD"
* the device is linked under /sys/class/power_supply/ and should
have a file called "online"
- if AC is connected, $1 returns "On", if not it returns "Off",
- Returns
* if AC is connected, $1 returns "On", if not it returns "Off",
if AC doesn't exist, $1 is "N/A"
vicious.contrib.ati

View File

@ -14,7 +14,7 @@ local math = {
}
-- }}}
local ac = {}
local ac_linux = {}
-- {{{ AC widget type
local function worker(format, warg)
@ -32,4 +32,4 @@ end
-- }}}
return setmetatable(_M, { __call = function(_, ...) return worker(...) end })
return setmetatable(ac_linux, { __call = function(_, ...) return worker(...) end })