Skip to content

Commit b630ec8

Browse files
hanfriedmartinbeentjes
authored andcommitted
Assume no battery percentage as ok, assume it might be a desktop (#58)
1 parent 51499f1 commit b630ec8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

scripts/battery_status_bg.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ print_battery_status_bg() {
3030
printf $color_high_charge
3131
elif [ $percentage -le 50 -a $percentage -ge 16 ];then
3232
printf $color_medium_charge
33+
elif [ "$percentage" == "" ];then
34+
printf $color_full_charge_default # assume it's a desktop
3335
else
3436
printf $color_low_charge
3537
fi

scripts/battery_status_fg.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ print_battery_status_fg() {
3030
printf $color_high_charge
3131
elif [ $percentage -le 50 -a $percentage -ge 16 ];then
3232
printf $color_medium_charge
33+
elif [ "$percentage" == "" ];then
34+
printf $color_full_charge_default # assume it's a desktop
3335
else
3436
printf $color_low_charge
3537
fi

0 commit comments

Comments
 (0)