From 96182a961a5562720b917aeec787c9424315bfa9 Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Wed, 12 Jun 2019 11:10:33 +0200 Subject: Fixed status bar formatting --- scripts/dwm-status | 4 ++-- scripts/weather.py | 3 +++ 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): -- cgit 1.4.1