about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-09-13 17:37:59 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-09-13 17:37:59 +0200
commit7fafe91b9915a34e3ffdd4b76d08c9fe56244369 (patch)
tree4dd113dd875375fad479e70ef32392ffce6a13f3
parentChanged variable name (diff)
downloaddwm-7fafe91b9915a34e3ffdd4b76d08c9fe56244369.tar.gz
dwm-7fafe91b9915a34e3ffdd4b76d08c9fe56244369.tar.bz2
dwm-7fafe91b9915a34e3ffdd4b76d08c9fe56244369.zip
Removed geolocate depend
-rwxr-xr-xscripts/dwm-status9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status
index ded8757..68a680b 100755
--- a/scripts/dwm-status
+++ b/scripts/dwm-status
@@ -22,7 +22,14 @@ checkinternet() {
 
 weather(){
 	if [ "$internet" = true ]; then
-		CURRENTLOCATION=$(geolocate)
+		CURRENTLOCATION=$(
+		curl -s http://ip-api.com/json | \
+        	jq '.lat, .lon' | \
+        	while read -r LATITUDE; do
+                	read -r LONGITUDE
+                	echo "${LATITUDE}:${LONGITUDE}" | tr -d '"'
+        	done
+		)
 		LANG="en"
 		UNITS="Metric"
 		API_KEY="756edce7e9d4c385ef9499a53492678c"