Ubuntu / Linux news and application reviews.

WeatherDesk is a Python3 tool that allows using a wallpaper that changes based on the weather and optionally, time of day. It supports most Linux desktop environments as well as Windows and Mac.

WeatherDesk weather-based wallpaper Linux

WeatherDesk features:
  • change the background based on the current weather conditions;
  • optionally change the background based on the time of day. This supports 4 variations: day/night, day/evening/night and morning/day/evening/night;
  • supports most Linux desktop environments, including Cinnamon, GNOME, Unity, Xfce, LXDE, LXQt, Pantheon, MATE, and more;
  • automatically detects your current city using ipinfo.io. In case this fails or you simply want to use a different city, you can manually specify the city as a command line argument
  • you can specify the image format, update interval, and more.

KDE Plasma 5 is not listed as supported on the WeatherDesk GitHub page, but looking at the code it appears that it might work. If you test WeatherDesk with Plasma 5, let us know if it works in the comments!

The tool requires a set of images named according to some naming rules, so don't expect it to alter your current desktop background or anything like that.

WeatherDesk weather-based wallpaper Linux

While WeatherDesk doesn't come with a built-in wallpaper set, its GitHub page points to a premade set, called FireWatch, available HERE (here's how it looks), which I'll use in the instructions below.

The FireWatch wallpaper set doesn't seem to differentiate between cloudy, normal and windy weather, but you can further tweak it yourself if you want it to be more accurate and your GIMP / Photoshop skills allow it. The set does include proper images for rain, snow, and thunder.

Installing and using WeatherDesk

1. Download / install WeatherDesk

WeatherDesk is available as two simple Python3 scripts that can run from the directory you download them to. You can grab the code from GitHub or simply click here to download the latest code from Git as .tar.gz.

To simplify things, you can use the commands below to download the latest WeatherDesk code from Git, install WeatherDesk in /opt/ and create a symbolic link to its executable in /usr/local/bin/:
sudo apt install wget #in case it's not already installed
wget https://github.com/bharadwaj-raju/WeatherDesk/archive/master.tar.gz -O /tmp/weatherdesk.tar.gz
tar -xvf /tmp/weatherdesk.tar.gz -C /tmp/
sudo mkdir /opt/weatherdesk
sudo cp /tmp/WeatherDesk-master/*.py /opt/weatherdesk/
sudo chmod +x /opt/weatherdesk/WeatherDesk.py
sudo ln -s /opt/weatherdesk/WeatherDesk.py /usr/local/bin/weatherdesk

After this, you can simply use "weatherdesk" in a terminal to run the tool.

2. Download the FireWatch WeatherDesk wallpaper pack

But wait, we're not done yet! That's because you'll also need some wallpapers to change based on current weather conditions and the time of day.

The wallpapers must be named according to some naming rules and placed in the ~/.weatherdesk_walls/ folder for WeatherDesk to pick them up. To make this easy, the WeatherDesk GitHub page points to a pack called FireWatch, which already contains images named according to the WeatherDesk rules.

To create the ~/.weatherdesk_walls folder, download the FireWatch WeatherDesk wallpaper set and extract it into the ~/.weatherdesk_walls folder, you can use the following commands:
mkdir ~/.weatherdesk_walls
wget https://github.com/bharadwaj-raju/FireWatch-WeatherDesk-Pack/archive/master.tar.gz -O /tmp/firewatchpack.tar.gz
tar -xvf /tmp/firewatchpack.tar.gz -C ~/.weatherdesk_walls/ --strip-components=1

3. Run WeatherDesk

That's it. Now you can simply run "weatherdesk" in a terminal and the app should automatically change your wallpaper based on the current weather conditions and time of day, using the FireWatch wallpaper pack:

If you want to use different wallpapers, you must rename them according to the WeatherDesk naming rules and place them in the ~/.weatherdesk_walls/ folder.

To see all the available WeatherDesk options, run the following command:
weatherdesk --help

For example, to force WeatherDesk to use the weather information for London instead of the automatically detected city, use:
weatherdesk -c london

To get WeatherDesk to also change the wallpaper based on the current time of day, and not just based on the current weather, run it with the "-t" option, like this:
weatherdesk -t

By default this will use the "day / evening / night" variation. To use the "morning / day / evening / night" variation (for more info about this, run "weatherdesk --info"), run it like this:
weatherdesk -t 4

If you want WeatherDesk to change the wallpaper based on current weather conditions every time you login, make sure to add it to your startup applications (in Ubuntu with Unity, launch Startup Applications, click "Add" and use "weatherdesk" as the command).

To report bugs, grab the source code, etc., see the WeatherDesk GitHub page.

Tip: to display the current weather temperature on top of the wallpaper, you could use WeatherDesk in conjunction with Deskweather (I din't try this, but it could be interesting).