You are not logged in.
Just recently vicious is somehow reading the battery status wrong
Although, I'm currently running on battery, this is its output

Reading off /sys/class/power_supply gives:
$ cat /sys/class/power_supply/BAT1/status
Discharging
Here's the snippet for the battery widget I'm using
vicious.register(batwidget, vicious.widgets.bat, function(batwidget, args)
local batico = ""
local batbar = ""
if args[1] == "↯" then
batico = "<span color='"..col_icon.."'>⮎</span>"
batbar = "<span color='"..col_bar_light.."'>AC Line</span>"
else
batbar = "<span color='"..col_bar_light.."'>"..args[2].."%</span>"
if args[1] == "+" then
batico = "<span color='"..col_icon.."'>⮒</span>"
elseif args[1] == "-" then
if args[2] > 49 then
batico = "<span color='"..col_icon.."'>⮏</span>"
elseif args[2] < 50 and args[2] > 25 then
batico = "<span color='"..col_icon.."'>⮑</span>"
else
batico = "<span color='"..col_icon.."'>⮐</span>"
end
else
batico = "<span color='"..col_icon.."'>⮎</span>" --This is the line that gets executed and not the one on top
end
end
return batico..' '..batbar
end, 3, "BAT1")I'm absolutely baffled as to why this happened
I would appreciate any help for this ![]()
Offline