Skip to content

Commit f35a171

Browse files
addressing corerabbit comments
1 parent 4564d62 commit f35a171

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

docs/CONFIG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ these settings will introduce the following icons:
223223
if you have no battery and would like the widget to hide in that case, set the following:
224224

225225
```bash
226-
set -g @dracula-battery-label false
227226
set -g @dracula-no-battery-label false
228227
```
229228

scripts/battery.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,10 @@ main()
178178
if [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power
179179
echo "$no_bat_label"
180180
else
181-
num_bats=$(wc -l <<< "$bat_perc")
182-
183181
IFS=$'\n' read -rd '' -a percs <<<"$bat_perc"
184182
IFS=$'\n' read -rd '' -a stats <<<"$(get_battery_status)"
185183
IFS=$'\n' read -rd '' -a lbls <<<"$bat_label"
184+
num_bats=${#percs[@]}
186185
show_bat_label=$(get_tmux_option "@dracula-show-battery-status" false)
187186
for ((i=0; i<num_bats; i++)); do
188187
if [[ i -gt 0 ]]; then

0 commit comments

Comments
 (0)