Merge pull request #416 from BarbUk/fix/tp_smapi
widget.contib.smapi: rename to tp_smap, include wibox, add batid param to get function
This commit is contained in:
commit
ca0bac403f
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ local helpers = require("lain.helpers")
|
||||||
local focused = require("awful.screen").focused
|
local focused = require("awful.screen").focused
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local naughty = require("naughty")
|
local naughty = require("naughty")
|
||||||
|
local wibox = require("wibox")
|
||||||
local string = string
|
local string = string
|
||||||
|
|
||||||
-- ThinkPad battery infos and widget creator
|
-- ThinkPad battery infos and widget creator
|
||||||
|
@ -34,7 +35,7 @@ local function factory(apipath)
|
||||||
end
|
end
|
||||||
|
|
||||||
function tp_smapi.percentage(batid)
|
function tp_smapi.percentage(batid)
|
||||||
return tp_smapi.get("remaining_percent")
|
return tp_smapi.get(batid, "remaining_percent")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- either running or charging time
|
-- either running or charging time
|
Loading…
Add table
Reference in a new issue