From c02e26fb70ecdb9a00f7e2f5d5fc77ba6b2aadec Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 16 Jul 2022 21:37:04 -0700 Subject: [PATCH] Fixed a few broken names --- modules/battery/widget.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/battery/widget.lua b/modules/battery/widget.lua index 2b48ef9..be0d860 100755 --- a/modules/battery/widget.lua +++ b/modules/battery/widget.lua @@ -13,9 +13,9 @@ for i=1, #widget.warnings do widget.warninglog[i] = false end -widget.image_path = beautiful.icons.widget.missing +widget.image_path = beautiful.icons.battery.missing widget.icon = wibox.widget { - image = beautiful.icons.widget.missing, + image = beautiful.icons.battery.missing, resize = true, widget = wibox.widget.imagebox, } @@ -107,7 +107,7 @@ widget.update = function(stdout) naughty.notify({ title = "Low power", text = "Battery is at " .. tostring(batpec) .. "%", - icon = beautiful.icons.widget.caution, + icon = beautiful.icons.battery.caution, timeout = 5, ignore_suspend = true, @@ -139,20 +139,20 @@ widget.update = function(stdout) end - widget.image_path = beautiful.icons.widget.missing + widget.image_path = beautiful.icons.battery.missing -- Set current battery icon if (not discharging) then - if batpec > 80 then widget.image_path = beautiful.icons.widget.charging.full - elseif batpec > 60 then widget.image_path = beautiful.icons.widget.charging.good - elseif batpec > 40 then widget.image_path = beautiful.icons.widget.charging.low - elseif batpec > 20 then widget.image_path = beautiful.icons.widget.charging.caution - elseif batpec <= 20 then widget.image_path = beautiful.icons.widget.charging.empty end + if batpec > 80 then widget.image_path = beautiful.icons.battery.charging.full + elseif batpec > 60 then widget.image_path = beautiful.icons.battery.charging.good + elseif batpec > 40 then widget.image_path = beautiful.icons.battery.charging.low + elseif batpec > 20 then widget.image_path = beautiful.icons.battery.charging.caution + elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.charging.empty end else - if batpec > 80 then widget.image_path = beautiful.icons.widget.full - elseif batpec > 60 then widget.image_path = beautiful.icons.widget.good - elseif batpec > 40 then widget.image_path = beautiful.icons.widget.low - elseif batpec > 20 then widget.image_path = beautiful.icons.widget.caution - elseif batpec <= 20 then widget.image_path = beautiful.icons.widget.empty end + if batpec > 80 then widget.image_path = beautiful.icons.battery.full + elseif batpec > 60 then widget.image_path = beautiful.icons.battery.good + elseif batpec > 40 then widget.image_path = beautiful.icons.battery.low + elseif batpec > 20 then widget.image_path = beautiful.icons.battery.caution + elseif batpec <= 20 then widget.image_path = beautiful.icons.battery.empty end end widget.icon.image = widget.image_path @@ -197,7 +197,7 @@ widget.widget:connect_signal("button::press", local out = naughty.notify({ title = "Battery:", text = batstat .. batpec .. "%", - icon = widget.image_path, + icon = widget.icon.image, replaces_id = widget.notid, ignore_suspend = true,