diff options
author | Joe <bousset.rudy@gmail.com> | 2022-08-30 10:23:11 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-08-30 10:23:11 +0200 |
commit | e150567d7f6e18d2bc211e0baf7f4c287c508271 (patch) | |
tree | b2c15115634651d046a452fa18356f5f2ede0707 /.local/bin/status/sb-forecast | |
parent | update (diff) | |
download | dotfiles-bsd-e150567d7f6e18d2bc211e0baf7f4c287c508271.tar.gz dotfiles-bsd-e150567d7f6e18d2bc211e0baf7f4c287c508271.tar.bz2 dotfiles-bsd-e150567d7f6e18d2bc211e0baf7f4c287c508271.tar.xz dotfiles-bsd-e150567d7f6e18d2bc211e0baf7f4c287c508271.tar.zst dotfiles-bsd-e150567d7f6e18d2bc211e0baf7f4c287c508271.zip |
up
Diffstat (limited to '.local/bin/status/sb-forecast')
-rwxr-xr-x | .local/bin/status/sb-forecast | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.local/bin/status/sb-forecast b/.local/bin/status/sb-forecast index 317b502..08b788d 100755 --- a/.local/bin/status/sb-forecast +++ b/.local/bin/status/sb-forecast @@ -12,11 +12,10 @@ getweather() { [ -f $weatherreport ] && [ "$(gnustat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || getweather -printf "%s%s %s" \ +printf "%s%s" \ "$(cat $weatherglyph)" \ - "$(cat $moonglyph)" \ - "$(sed '16q;d' "$weatherreport" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/ /g;1q" | tr -d '\n')" + "$(sed '16q;d' "$weatherreport" | grep -wo "[0-9]*%" | sort -rn | sed "s/^//g;1q" | tr -d '\n')" \ sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | - awk '{print " " $1 "/" $2 "°C" moon}' + awk -v moon="$(cat $moonglyph)" '{print " " $1 "/" $2 "°C " moon}' |