diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-12-05 13:38:14 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-12-05 13:38:14 -0500 |
| commit | 29b1c791f6e319cdab828cee5f491ca1c38e41d1 (patch) | |
| tree | be9d9d43d150f0b72f72e4e37cc43bde0e10b72e /.local/bin/weather | |
| parent | 5849e2ad7323f086bd6edf221b29e3f0b2b7cbd3 (diff) | |
Some New Configuration Tools
Diffstat (limited to '.local/bin/weather')
| -rwxr-xr-x | .local/bin/weather | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/.local/bin/weather b/.local/bin/weather deleted file mode 100755 index 664b0b1..0000000 --- a/.local/bin/weather +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 -curl -sf "wttr.in/Ocean+City" > "$HOME/.cache/weatherreport" || exit 1 ;} - -showweather() { printf "%s" "$(sed '16q;d' "$HOME/.cache/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/☔ /g" | tr -d '\n')" -sed '13q;d' "$HOME/.cache/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄",$1 "°","🌞",$2 "°"}' ;} - -[ "$(stat -c %y "$HOME/.cache/weatherreport" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && getforecast -showweather |
