X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/49221b80556abd4f0c6203fa0aafdd5436db03ce..312017f3699e61973cdcf87d577a8cc21a4c2dc6:/widgets/alsabar.lua?ds=sidebyside

diff --git a/widgets/alsabar.lua b/widgets/alsabar.lua
index b12e55c..b2cba9e 100644
--- a/widgets/alsabar.lua
+++ b/widgets/alsabar.lua
@@ -70,11 +70,9 @@ function alsabar.notify()
         preset.title = alsabar.channel .. " - " .. alsabar._current_level .. "%"
     end
 
-    int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size)
-    preset.text = "["
-                .. string.rep("|", int)
-                .. string.rep(" ", alsabar.notifications.bar_size - int)
-                .. "]"
+    local int = math.modf((alsabar._current_level / 100) * alsabar.notifications.bar_size)
+    preset.text = string.format("[%s%s]", string.rep("|", int),
+                  string.rep(" ", alsabar.notifications.bar_size - int))
 
     if alsabar._notify ~= nil then
         alsabar._notify = naughty.notify ({