local function batclosure ()
local nextlim = limits[1][1]
return function (_, args)
local function batclosure ()
local nextlim = limits[1][1]
return function (_, args)
local state, charge = args[1], args[2]
if not charge then return end
local state, charge = args[1], args[2]
if not charge then return end
if charge <= nextlim then
naughty.notify({title = "⚡ Warning! ⚡",
if charge <= nextlim then
naughty.notify({title = "⚡ Warning! ⚡",
-vicious.register(batterywidget, vicious.widgets.bat, batclosure(),
- 31, "BAT0")
+vicious.register(batterywidget, vicious.widgets.bat, batclosure(), 31, "BAT0")