move ac widget to match new layout
This commit is contained in:
parent
57d847301f
commit
387ab4a8b1
|
@ -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
|
core Lua distribution. Ease of installation and use does not
|
||||||
necessarily have to apply to contributed widgets.
|
necessarily have to apply to contributed widgets.
|
||||||
|
|
||||||
vicious.contrib.ac
|
**vicious.contrib.ac**
|
||||||
- provide status about the power supply (AC)
|
|
||||||
- takes the AC device as an argument, i.e "AC" or "ACAD"
|
Provide status about the power supply (AC)
|
||||||
- the device is linked under /sys/class/power_supply/ and should
|
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"
|
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"
|
if AC doesn't exist, $1 is "N/A"
|
||||||
|
|
||||||
vicious.contrib.ati
|
vicious.contrib.ati
|
|
@ -14,7 +14,7 @@ local math = {
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
local ac = {}
|
local ac_linux = {}
|
||||||
|
|
||||||
-- {{{ AC widget type
|
-- {{{ AC widget type
|
||||||
local function worker(format, warg)
|
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 })
|
Loading…
Reference in New Issue