diff options
Diffstat (limited to 'scripts/dwm-status')
-rwxr-xr-x | scripts/dwm-status | 6 |
1 files 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') |