Weather Radar Widget for Plasma 6.0

Hi all! So, I used to have a NOAA weather radar image displayed in my side panel using a Plasma 5.0 widget, and the 6.0 update hosed that. So, I did some research on how to re-create it, and I though I’d post it for you all. Here is what it looks like:

Screenshot_20240413_094259

First of all, I scrape the NOAA website for the current radar picture. For my area, their webpage is NWS Radar, and the actual image link is https://radar.weather.gov/ridge/standard/KGLD_loop.gif, which address i find in the HTML for that webpage.

I do this with a script that I’ve saved to /etc/profile.d/ It is:

#!/bin/sh
cd /home/username/Pictures
while true
do
  rm ./KGLD_loop.gif
  wget https://radar.weather.gov/ridge/standard/KGLD_loop.gif -O ./KGLD_loop.gif
  sleep 300
done

By putting the script in that directory, it runs at login.

Then, I add a Media Frame widget to the panel, and configure it to display that one image, and also configure the widget to reload every five minutes. I wouldn’t recommend a shorter timeframe. I believe the radar image updates about every ten minutes.

Enjoy!

So, the loop in the script seemed to block the desktop environment from loading. So I modified the above as follows:

I moved the above script to /home/username/getradarpicture.sh, and created a different script in /etc/profile.d/ that contains “sh /home/username/getradarpicture.sh & disown”. This stopped the script from blocking the loading of the desktop environment.