summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--battery-widget/battery.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/battery-widget/battery.lua b/battery-widget/battery.lua
index 47955c9..3a8b1b9 100644
--- a/battery-widget/battery.lua
+++ b/battery-widget/battery.lua
@@ -7,8 +7,8 @@ local watch = require("awful.widget.watch")
-- Battery 0: Discharging, 75%, 01:51:38 remaining
-- Battery 0: Charging, 53%, 00:57:43 until charged
-local path_to_icons = "/usr/share/icons/Arc/status/symbolic/"
-local username = os.getenv("USER")
+local PATH_TO_ICONS = "/usr/share/icons/Arc/status/symbolic/"
+local USERNAME = os.getenv("USER")
battery_widget = wibox.widget {
{
@@ -16,7 +16,7 @@ battery_widget = wibox.widget {
widget = wibox.widget.imagebox,
resize = false
},
- layout = wibox.container.margin(brightness_icon, 0, 0, 3),
+ layout = wibox.container.margin(_, 0, 0, 3),
set_image = function(self, path)
self.icon.image = path
end
@@ -41,7 +41,7 @@ watch(
else
batteryType = string.format(batteryType,'')
end
- widget.image = path_to_icons .. batteryType .. ".svg"
+ widget.image = PATH_TO_ICONS .. batteryType .. ".svg"
-- Update popup text
-- TODO: Filter long lines
@@ -80,7 +80,7 @@ battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notific
--[[ Show warning notification ]]
function show_battery_warning()
naughty.notify{
- icon = "/home/" .. username .. "/.config/awesome/nichosi.png",
+ icon = "/home/" .. USERNAME .. "/.config/awesome/nichosi.png",
icon_size=100,
text = "Huston, we have a problem",
title = "Battery is dying",