From: Luca CPZ <1777696+lcpz@users.noreply.github.com> Date: Sat, 1 Dec 2018 18:30:04 +0000 (+0000) Subject: Merge pull request #416 from BarbUk/fix/tp_smapi X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/ca0bac403f4c52300454fd26e46a5deb570cfda6?hp=233768f0963167af1d2621d10157cd64a87c904c Merge pull request #416 from BarbUk/fix/tp_smapi widget.contib.smapi: rename to tp_smap, include wibox, add batid param to get function --- diff --git a/widget/contrib/smapi.lua b/widget/contrib/tp_smapi.lua similarity index 98% rename from widget/contrib/smapi.lua rename to widget/contrib/tp_smapi.lua index 06b3cbd..7192990 100644 --- a/widget/contrib/smapi.lua +++ b/widget/contrib/tp_smapi.lua @@ -10,6 +10,7 @@ local helpers = require("lain.helpers") local focused = require("awful.screen").focused local gears = require("gears") local naughty = require("naughty") +local wibox = require("wibox") local string = string -- ThinkPad battery infos and widget creator @@ -34,7 +35,7 @@ local function factory(apipath) end function tp_smapi.percentage(batid) - return tp_smapi.get("remaining_percent") + return tp_smapi.get(batid, "remaining_percent") end -- either running or charging time