summaryrefslogtreecommitdiff
path: root/rc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'rc.lua')
-rw-r--r--rc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.lua b/rc.lua
index d4aa847..999d1f6 100644
--- a/rc.lua
+++ b/rc.lua
@@ -326,8 +326,8 @@ function act()
awful.spawn.easy_async("bash -c \"acpi | cut -d',' -f2 \"",
function(percent, stderr, reason, exit_code)
a, b = string.find( percent, "%%")
- nPercent = tonumber(string.sub(percent,2,a-1))
if a then
+ nPercent = tonumber(string.sub(percent,2,a-1))
mybatwidget:set_text ("🔌 " .. nPercent .. "%")
end
end)