Skip to content

Commit 59b7648

Browse files
authored
Merge pull request #462 from jackdeye/main
Fix API call in yrno() function
2 parents 298b022 + 4e4ec2a commit 59b7648

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

segments/weather.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ __yrno() {
9797
fi
9898

9999
jsonparser="${TMUX_POWERLINE_SEG_WEATHER_JSON}"
100-
degree=$(echo "$weather_data" | $jsonparser -r .properties.timeseries[0].data.instant.details.air_temperature)
101-
condition=$(echo "$weather_data" | $jsonparser -r .properties.timeseries[0].data.next_1_hours.summary.symbol_code)
100+
degree=$(echo "$weather_data" | $jsonparser -r '.properties.timeseries | .[0].data.instant.details.air_temperature')
101+
condition=$(echo "$weather_data" | $jsonparser -r '.properties.timeseries | .[0].data.next_1_hours.summary.symbol_code')
102102
elif [ -f "${tmp_file}" ]; then
103103
__read_tmp_file
104104
fi

0 commit comments

Comments
 (0)