fix exit code and color
This commit is contained in:
@ -7,7 +7,7 @@ function batteryColor(batteryPercent) {
|
||||
switch(batteryPercent) {
|
||||
case -1: color = "green"; break;
|
||||
case -2: color = "red"; break;
|
||||
default: color = colors[~~(batteryPercent / 10 + 0.5)]; break;
|
||||
default: color = colors[~~(batteryPercent / 10 + 0.5) - 1]; break;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
Reference in New Issue
Block a user