diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-25 23:56:49 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-25 23:56:49 +0200 |
commit | ec8532dc710a04fc9d8091fd2568d8967db42b16 (patch) | |
tree | e23fc41ac299ffd0a996c0259eec69a7ba712ba7 | |
parent | Improved the overall scripts coehesion (POSIX) (diff) | |
download | dwm-ec8532dc710a04fc9d8091fd2568d8967db42b16.tar.gz dwm-ec8532dc710a04fc9d8091fd2568d8967db42b16.tar.bz2 dwm-ec8532dc710a04fc9d8091fd2568d8967db42b16.zip |
Formatting
-rwxr-xr-x | scripts/dwm-status | 21 | ||||
-rw-r--r-- | scripts/weather.py | 2 |
2 files changed, 12 insertions, 11 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status index 716c9ec..91905fc 100755 --- a/scripts/dwm-status +++ b/scripts/dwm-status @@ -27,13 +27,13 @@ updates() { updates_arch=0 fi - if (( $counter % 60 == 0 )); then #this is done to add a delay and not saturate aur requests + #if (( $counter % 60 == 0 )); then #this is done to add a delay and not saturate aur requests if ! updates_aur=$(yay -Qum --devel 2> /dev/null | wc -l); then updates_aur=0 fi - else - : - fi + #else + # updates_aur=0 # this is wrong. There shouldnt be else but fi + #fi updates=$(("$updates_arch" + "$updates_aur")) @@ -107,13 +107,13 @@ bluetooth() { # explained. status() { \ - echo $(tor) + tor # Directs to the path of the weather script. echo $(python $( cd "$(dirname "$0")" ; pwd -P )/weather.py) # echo "$delim" (done in the weather script) - echo $(updates) + updates # Show unread mail command -v neomutt >/dev/null 2>&1 && @@ -134,11 +134,11 @@ status() { \ echo "$delim" - echo $(bluetooth) + bluetooth echo "$delim" - echo $(wireless) + wireless CPU_T=$(< /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input) CPU_TEMP=$(expr "$CPU_T" / 1000) @@ -192,10 +192,11 @@ while :; do # to prevent some weird issues that cause significant slowing of # everything in dwm. Note entirely sure of the cause, but again, the tr # command easily avoids it. - xsetroot -name "$(status | tr '\n' ' ')" - + checkinternet + xsetroot -name "$(status | tr '\n' ' ')" + ((counter++)) # Sleep for a minute after changing the status bar before updating it diff --git a/scripts/weather.py b/scripts/weather.py index 936dc6f..1f4bfba 100644 --- a/scripts/weather.py +++ b/scripts/weather.py @@ -14,7 +14,7 @@ try: except requests.ConnectionError: internet = False -COORDINATES = s = open("/usr/share/geolocate/.location", 'r').read() +COORDINATES = open("/usr/share/geolocate/.location", 'r').read() LOCATION = "lat=" + COORDINATES.replace(":","&lon=") API_KEY = "756edce7e9d4c385ef9499a53492678c" |