about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 11:10:33 +0200
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-06-12 11:10:33 +0200
commit96182a961a5562720b917aeec787c9424315bfa9 (patch)
treeab3325e00d75105339a4c6c59266d09dee4720ee
parentFixed a formatting issue (diff)
downloaddwm-96182a961a5562720b917aeec787c9424315bfa9.tar.gz
dwm-96182a961a5562720b917aeec787c9424315bfa9.tar.bz2
dwm-96182a961a5562720b917aeec787c9424315bfa9.zip
Fixed status bar formatting
-rwxr-xr-xscripts/dwm-status4
-rw-r--r--scripts/weather.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status
index 112c2ee..9bde75b 100755
--- a/scripts/dwm-status
+++ b/scripts/dwm-status
@@ -36,7 +36,7 @@ tor() {
 
 	if [ $status == "active" ]
 	then
-	    echo "$delim $icon_enabled $delim"
+	    echo "$icon_enabled $delim"
 	else
 	    echo "$icon_disabled"
 	fi
@@ -52,7 +52,7 @@ status() { \
 	# Directs to the path of the weather script.
 	echo $(python $( cd "$(dirname "$0")" ; pwd -P )/weather.py)
 
-	echo "$delim"
+#	echo "$delim" (done in the weather script)
 
 	echo $(updates)
 
diff --git a/scripts/weather.py b/scripts/weather.py
index ddf1ce7..936dc6f 100644
--- a/scripts/weather.py
+++ b/scripts/weather.py
@@ -3,6 +3,8 @@
 import requests
 import os
 
+delim="|"
+
 # Check for an internet connection
 url='http://www.google.com/'
 timeout=5
@@ -32,6 +34,7 @@ if internet == True:
             CURRENT = REQ.json()["weather"][0]["description"].capitalize()
             TEMP = int(float(REQ.json()["main"]["temp"]))
             print(" {}, {} °{}".format(CURRENT, TEMP, UNIT_KEY))
+            print(delim)
         else:
             print("Error: BAD HTTP STATUS CODE " + str(REQ.status_code))
     except (ValueError, IOError):