Skip to content

Commit 832d064

Browse files
committed
start weather script only when weather is present in plugins
1 parent 9fcf451 commit 832d064

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/dracula.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ main()
2323
show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false)
2424
show_day_month=$(get_tmux_option "@dracula-day-month" false)
2525
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
26+
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
2627

2728
# Dracula Color Pallette
2829
white='#f8f8f2'
@@ -64,7 +65,7 @@ main()
6465
fi
6566

6667
# start weather script in background
67-
if $show_weather; then
68+
if [[ "${plugins[@]}" =~ "weather" ]]; then
6869
$current_dir/sleep_weather.sh $show_fahrenheit $show_location &
6970
fi
7071

@@ -123,7 +124,6 @@ main()
123124

124125
# Status right
125126
tmux set-option -g status-right ""
126-
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
127127

128128
for plugin in "${plugins[@]}"; do
129129
if [ $plugin = "battery" ]; then

0 commit comments

Comments
 (0)