dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4bab39ad70cb5f5cabad3ee647c4072d0129b7a7
parent 07364aeaca6fae238d0569932829247388d5102b
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Wed,  2 Jan 2019 11:09:31 -0500

weather report also moved to /tmp/

Diffstat:
M.scripts/cron/getforecast | 2+-
M.scripts/statusbar/weather | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.scripts/cron/getforecast b/.scripts/cron/getforecast @@ -2,5 +2,5 @@ # Updates weather forecast ping -q -w 1 -c 1 "$(ip r | grep default | tail -1 | cut -d ' ' -f 3)" >/dev/null || exit location="$1"; [ -z "$location" ] || location="$location+" -curl -s "wttr.in/$location" > ~/.weatherreport +curl -s "wttr.in/$location" > /tmp/weatherreport pkill -RTMIN+5 i3blocks && notify-send "🌞 Weather forecast updated." diff --git a/.scripts/statusbar/weather b/.scripts/statusbar/weather @@ -2,7 +2,7 @@ [ "$(stat -c %y .weatherreport | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] && getforecast case $BLOCK_BUTTON in - 1) $TERMINAL -e less -Srf ~/.weatherreport ;; + 1) $TERMINAL -e less -S /tmp/weatherreport ;; 3) pgrep -x dunst >/dev/null && notify-send "<b>🌈 Weather module:</b> - Click for wttr.in forecast. ☔: Chance of rain/snow @@ -10,6 +10,6 @@ case $BLOCK_BUTTON in 🌞: Daily high" ;; esac -printf "%s" "$(sed '16q;d' ~/.weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" +printf "%s" "$(sed '16q;d' /tmp/weatherreport | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" -sed '13q;d' ~/.weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}' +sed '13q;d' /tmp/weatherreport | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "°","🌞",$2 "°"}'