From ccb8c9ff17f825e16aeb15c0f717f59656136f0d Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Wed, 4 Sep 2019 15:27:33 +0200 Subject: Changed variable name --- scripts/dwm-status | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dwm-status b/scripts/dwm-status index c110dd6..ded8757 100755 --- a/scripts/dwm-status +++ b/scripts/dwm-status @@ -22,13 +22,13 @@ checkinternet() { weather(){ if [ "$internet" = true ]; then - LOCATION=$(geolocate) + CURRENTLOCATION=$(geolocate) LANG="en" UNITS="Metric" API_KEY="756edce7e9d4c385ef9499a53492678c" - LOCATION_FORMATTED_2=$(echo $LOCATION | cut -d ':' -f2) - LOCATION_FORMATTED_1=$(echo $LOCATION | cut -d ':' -f1) + LOCATION_FORMATTED_2=$(echo $CURRENTLOCATION | cut -d ':' -f2) + LOCATION_FORMATTED_1=$(echo $CURRENTLOCATION | cut -d ':' -f1) OUTPUT=$(curl -s "http://api.openweathermap.org/data/2.5/weather?lat=$LOCATION_FORMATTED_1&lon=$LOCATION_FORMATTED_2&lang=$LANG&appid=$API_KEY&units=$UNITS") STATUS=$(echo $OUTPUT | jq '.weather' | tr '[' ' ' | tr ']' ' ' | jq '.main' | sed 's/"//g') -- cgit 1.4.1