battery.lua: Initialize mask_state
authorJoachim Nilsson <troglobit@gmail.com>
Fri, 1 Apr 2016 00:37:10 +0000 (02:37 +0200)
committerJoachim Nilsson <troglobit@gmail.com>
Fri, 1 Apr 2016 00:37:10 +0000 (02:37 +0200)
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>

delightful/widgets/battery.lua

index 6b4144e..78169cf 100644 (file)
@@ -275,7 +275,7 @@ end
 
 -- Vicious display formatter, also update widget tooltip and icon
 function vicious_formatter(widget, data)
-    local mask_state, mask_capacity
+    local mask_state = mask.DISCHARGING, mask_capacity
     if data[1] and state_mapping[data[1]] then
         mask_state = state_mapping[data[1]]
     end