Skip to content

Commit 9af78ae

Browse files
committed
address coderabbit comment
1 parent 909b54d commit 9af78ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/battery.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ 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, don't show anything
177-
if [ -z "$bat_perc" ] && [ "$hide_on_desktop" = "true" ]; then
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
178178
echo ""
179179
return
180180
fi

0 commit comments

Comments
 (0)