summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorivan-boikov <ik.boikov.public@protonmail.com>2023-11-25 14:41:56 +0100
committerivan-boikov <ik.boikov.public@protonmail.com>2023-11-25 14:41:56 +0100
commit3fccdd9602a31a0722d6dc1dd4a046abf919eee4 (patch)
tree06711c0784b3b8e5bd8ab7bf22eaf4596a03c595 /scripts
parent182fb7d8b6dcf50d72361daca9814afee91fe91e (diff)
Update nnn plugs
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/.local/bin/sb-cputemp (renamed from scripts/.local/bin/sb-cpu)0
-rwxr-xr-xscripts/.local/bin/sb-forecast21
2 files changed, 0 insertions, 21 deletions
diff --git a/scripts/.local/bin/sb-cpu b/scripts/.local/bin/sb-cputemp
index 4594826..4594826 100755
--- a/scripts/.local/bin/sb-cpu
+++ b/scripts/.local/bin/sb-cputemp
diff --git a/scripts/.local/bin/sb-forecast b/scripts/.local/bin/sb-forecast
deleted file mode 100755
index 40a50c3..0000000
--- a/scripts/.local/bin/sb-forecast
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# If we have internet, get a weather report from wttr.in and store it locally.
-# You could set up a shell alias to view the full file in a pager in the
-# terminal if desired. This function will only be run once a day when needed.
-weatherreport="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport"
-getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;}
-
-# Some very particular and terse stream manipulation. We get the maximum
-# precipitation chance and the daily high and low from the downloaded file and
-# display them with coresponding emojis.
-showweather() { printf "%s" "$(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 "°"}' ;}
-
-# The test if our forcecast is updated to the day. If it isn't download a new
-# weather report from wttr.in with the above function.
-[ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] ||
- getforecast
-
-showweather