diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 9af2d9a..d99c0a1 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -238,7 +238,7 @@ main() elif [ $plugin = "weather" ]; then IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray") - script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location $fixed_location)" + script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location '$fixed_location')" elif [ $plugin = "time" ]; then IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-time-colors" "dark_purple white") diff --git a/scripts/weather.sh b/scripts/weather.sh index 6debde5..e8bbd8f 100755 --- a/scripts/weather.sh +++ b/scripts/weather.sh @@ -23,7 +23,7 @@ fetch_weather_information() { display_weather=$1 # it gets the weather condition textual name (%C), and the temperature (%t) - curl -sL wttr.in/$fixedlocation\?format="%C+%t$display_weather" + curl -sL wttr.in/${fixedlocation// /%20}\?format="%C+%t$display_weather" } #get weather display diff --git a/scripts/weather_wrapper.sh b/scripts/weather_wrapper.sh index 75dc1f3..3356ce8 100755 --- a/scripts/weather_wrapper.sh +++ b/scripts/weather_wrapper.sh @@ -20,7 +20,7 @@ main() if [ "$(expr ${TIME_LAST} + ${RUN_EACH})" -lt "${TIME_NOW}" ]; then # Run weather script here - $current_dir/weather.sh $fahrenheit $location $fixedlocation > "${DATAFILE}" + $current_dir/weather.sh $fahrenheit $location "$fixedlocation" > "${DATAFILE}" echo "${TIME_NOW}" > "${LAST_EXEC_FILE}" fi