diff options
author | ache <ache@ache.one> | 2021-11-20 20:05:08 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2021-11-20 20:05:08 +0100 |
commit | 3a21251b15df0c26e725fad8a0f67663f232af2d (patch) | |
tree | 827c1cc3a76248edddb95520d3dc25dcc5be6171 /rc.lua | |
parent | Update Wifi signal (diff) |
Fix use before check null error
Diffstat (limited to 'rc.lua')
-rw-r--r-- | rc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |