remove unnecessary tmux junk

This commit is contained in:
Noah Masur
2021-04-10 13:40:34 -04:00
parent cd8fd18427
commit 7877d1be13
3 changed files with 5 additions and 24 deletions

View File

@ -1,12 +1,11 @@
#!/bin/sh
CACHE_FILE="$HOME/.tmux/.weather_cache"
CACHE_TIME=$(stat -f %m $CACHE_FILE)
CACHE_TIME="$(stat -f %m "$CACHE_FILE")"
NOW_TIME=$(date +%s)
TIME_PASSED=$((NOW_TIME-CACHE_TIME))
if [[ "$TIME_PASSED" -gt "1200" ]]
if [ "$TIME_PASSED" -gt "1200" ]
then
curl -m 2 -s wttr.in/$WEATHER_CITY\?format\="%c%t" > $CACHE_FILE
curl -m 2 -s "wttr.in/$WEATHER_CITY?format=%c%t" > "$CACHE_FILE"
fi
cat $CACHE_FILE
cat "$CACHE_FILE"