We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9fa47b commit 281b8c2Copy full SHA for 281b8c2
scripts/battery.sh
@@ -175,7 +175,12 @@ main()
175
if [ -z "$bat_perc" ]; then # In case it is a desktop with no battery percent, only AC power
176
echo "$no_bat_label"
177
elif [ -z "$bat_stat" ]; then # Test if status is empty or not
178
- echo "$bat_label $bat_perc"
+ # Only add a space when label is not empty
179
+ if [ -n "$bat_label" ]; then
180
+ echo "$bat_label $bat_perc"
181
+ else
182
+ echo "$bat_perc"
183
+ fi
184
else
185
echo "$bat_label$bat_stat $bat_perc"
186
fi
0 commit comments