X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/013654cd1af4bb69f31c1c641cdb24bd8b7c58df..fd2e616097ac4cb072957b3f0b8134ac1970f831:/widget/contrib/tp_smapi.lua?ds=sidebyside diff --git a/widget/contrib/tp_smapi.lua b/widget/contrib/tp_smapi.lua index 4f43e44..b8acbe2 100644 --- a/widget/contrib/tp_smapi.lua +++ b/widget/contrib/tp_smapi.lua @@ -12,6 +12,7 @@ local gears = require("gears") local naughty = require("naughty") local wibox = require("wibox") local string = string +local type = type -- ThinkPad battery infos and widget creator -- http://www.thinkwiki.org/wiki/Tp_smapi @@ -73,7 +74,7 @@ local function factory(apipath) tp_smapi.notification = naughty.notify { title = string.format("%s: %s %s (%s)", batid, mfgr, model, chem), text = msg, - timeout = seconds or 0, + timeout = type(seconds) == "number" and seconds or 0, screen = scr or focused() } end