From 832d06405b51a0747e542f6206cd792cced9948d Mon Sep 17 00:00:00 2001 From: Sabato Luca Guadagno Date: Thu, 22 Jul 2021 12:23:57 +0200 Subject: [PATCH] start weather script only when weather is present in plugins --- scripts/dracula.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index e830d65..cb0f7a0 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -23,6 +23,7 @@ main() show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false) show_day_month=$(get_tmux_option "@dracula-day-month" false) show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5) + IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather") # Dracula Color Pallette white='#f8f8f2' @@ -64,7 +65,7 @@ main() fi # start weather script in background - if $show_weather; then + if [[ "${plugins[@]}" =~ "weather" ]]; then $current_dir/sleep_weather.sh $show_fahrenheit $show_location & fi @@ -123,7 +124,6 @@ main() # Status right tmux set-option -g status-right "" - IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather") for plugin in "${plugins[@]}"; do if [ $plugin = "battery" ]; then