Fixed a few broken names
parent
fb114f52d9
commit
c02e26fb70
|
@ -13,9 +13,9 @@ for i=1, #widget.warnings do
|
||||||
widget.warninglog[i] = false
|
widget.warninglog[i] = false
|
||||||
end
|
end
|
||||||
|
|
||||||
widget.image_path = beautiful.icons.widget.missing
|
widget.image_path = beautiful.icons.battery.missing
|
||||||
widget.icon = wibox.widget {
|
widget.icon = wibox.widget {
|
||||||
image = beautiful.icons.widget.missing,
|
image = beautiful.icons.battery.missing,
|
||||||
resize = true,
|
resize = true,
|
||||||
widget = wibox.widget.imagebox,
|
widget = wibox.widget.imagebox,
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ widget.update = function(stdout)
|
||||||
naughty.notify({
|
naughty.notify({
|
||||||
title = "Low power",
|
title = "Low power",
|
||||||
text = "Battery is at " .. tostring(batpec) .. "%",
|
text = "Battery is at " .. tostring(batpec) .. "%",
|
||||||
icon = beautiful.icons.widget.caution,
|
icon = beautiful.icons.battery.caution,
|
||||||
|
|
||||||
timeout = 5,
|
timeout = 5,
|
||||||
ignore_suspend = true,
|
ignore_suspend = true,
|
||||||
|
@ -139,20 +139,20 @@ widget.update = function(stdout)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
widget.image_path = beautiful.icons.widget.missing
|
widget.image_path = beautiful.icons.battery.missing
|
||||||
-- Set current battery icon
|
-- Set current battery icon
|
||||||
if (not discharging) then
|
if (not discharging) then
|
||||||
if batpec > 80 then widget.image_path = beautiful.icons.widget.charging.full
|
if batpec > 80 then widget.image_path = beautiful.icons.battery.charging.full
|
||||||
elseif batpec > 60 then widget.image_path = beautiful.icons.widget.charging.good
|
elseif batpec > 60 then widget.image_path = beautiful.icons.battery.charging.good
|
||||||
elseif batpec > 40 then widget.image_path = beautiful.icons.widget.charging.low
|
elseif batpec > 40 then widget.image_path = beautiful.icons.battery.charging.low
|
||||||
elseif batpec > 20 then widget.image_path = beautiful.icons.widget.charging.caution
|
elseif batpec > 20 then widget.image_path = beautiful.icons.battery.charging.caution
|
||||||
elseif batpec <= 20 then widget.image_path = beautiful.icons.widget.charging.empty end
|
elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.charging.empty end
|
||||||
else
|
else
|
||||||
if batpec > 80 then widget.image_path = beautiful.icons.widget.full
|
if batpec > 80 then widget.image_path = beautiful.icons.battery.full
|
||||||
elseif batpec > 60 then widget.image_path = beautiful.icons.widget.good
|
elseif batpec > 60 then widget.image_path = beautiful.icons.battery.good
|
||||||
elseif batpec > 40 then widget.image_path = beautiful.icons.widget.low
|
elseif batpec > 40 then widget.image_path = beautiful.icons.battery.low
|
||||||
elseif batpec > 20 then widget.image_path = beautiful.icons.widget.caution
|
elseif batpec > 20 then widget.image_path = beautiful.icons.battery.caution
|
||||||
elseif batpec <= 20 then widget.image_path = beautiful.icons.widget.empty end
|
elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.empty end
|
||||||
end
|
end
|
||||||
widget.icon.image = widget.image_path
|
widget.icon.image = widget.image_path
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ widget.widget:connect_signal("button::press",
|
||||||
local out = naughty.notify({
|
local out = naughty.notify({
|
||||||
title = "Battery:",
|
title = "Battery:",
|
||||||
text = batstat .. batpec .. "%",
|
text = batstat .. batpec .. "%",
|
||||||
icon = widget.image_path,
|
icon = widget.icon.image,
|
||||||
replaces_id = widget.notid,
|
replaces_id = widget.notid,
|
||||||
ignore_suspend = true,
|
ignore_suspend = true,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue