summaryrefslogtreecommitdiff
path: root/bin/statusline
diff options
context:
space:
mode:
Diffstat (limited to 'bin/statusline')
-rwxr-xr-xbin/statusline4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/statusline b/bin/statusline
index 948e8cb..b442b91 100755
--- a/bin/statusline
+++ b/bin/statusline
@@ -50,8 +50,8 @@ function battery()
f:close()
local symbol = 'ERROR'
- local i = capacity > 0 and (capacity - 1) // 10 or 0
- if status == 'Discharging\n' then
+ local i = capacity > 0 and (capacity - 1) // 10 + 1 or 1
+ if status == 'Discharging\n' or status == 'Not charging\n' then
symbol = ({"󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"})[i] -- 󰂃
elseif status == 'Charging\n' then
symbol = ({"󰢜", "󰂆", "󰂇", "󰂈", "󰢝", "󰂉", "󰢞", "󰂊", "󰂋", "󰂅"})[i]