Skip to content

Commit

Permalink
Merge pull request #246 from dwdunham/fix-fixed-location-space-breaks
Browse files Browse the repository at this point in the history
Fix multi word fixed location
  • Loading branch information
ethancedwards8 authored Jan 6, 2024
2 parents 3f2466a + 504098e commit 6dd08eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/dracula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion scripts/weather.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/weather_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6dd08eb

Please sign in to comment.