Skip to content

Commit

Permalink
start weather script only when weather is present in plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
o0th committed Jul 22, 2021
1 parent 9fcf451 commit 832d064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/dracula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 832d064

Please sign in to comment.