Merge pull request #246 from dwdunham/fix-fixed-location-space-breaks

Fix multi word fixed location
This commit is contained in:
Ethan Edwards 2024-01-06 09:26:20 -05:00 committed by GitHub
commit 6dd08eb3f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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")

View file

@ -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

View file

@ -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