Skip to content

Commit c9fa47b

Browse files
committed
fix no battery label order
1 parent d85b265 commit c9fa47b

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

docs/CONFIG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,6 @@ alternatively, if you have no battery and would like a nerdfont icon to indicate
219219
set -g @dracula-no-battery-label ""
220220
```
221221

222-
if you only want to hide the battery widget on a desktop pc, set the following:
223-
224-
```bash
225-
# default is false
226-
set -g @dracula-battery-hide-on-desktop true
227-
```
228-
229222
### compact-alt - [up](#table-of-contents)
230223

231224
This widget allows the user to switch to an alternate list of widgets when the terminal becomes narrow.

scripts/battery.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,10 @@ main()
172172

173173
bat_perc=$(battery_percent)
174174

175-
hide_on_desktop=$(get_tmux_option "@dracula-battery-hide-on-desktop" false)
176-
# If no battery percent and the feature flag is enabled, hide the widget completely
177-
if $hide_on_desktop && [ -z "$bat_perc" ]; then
178-
echo ""
179-
return
180-
fi
181-
182-
if [ -z "$bat_stat" ]; then # Test if status is empty or not
183-
echo "$bat_label $bat_perc"
184-
elif [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power
175+
if [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power
185176
echo "$no_bat_label"
177+
elif [ -z "$bat_stat" ]; then # Test if status is empty or not
178+
echo "$bat_label $bat_perc"
186179
else
187180
echo "$bat_label$bat_stat $bat_perc"
188181
fi

0 commit comments

Comments
 (0)