Skip to content

Commit 8947ea5

Browse files
committed
Live earth wallpaper blog post
1 parent ebe26f3 commit 8947ea5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

content/blog/earth-wallpaper.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
+++
2+
title = "Earth Wallpaper"
3+
description = "Live satelite imagery makes for a pretty cool wallpaper - here is how to do it."
4+
date = 2025-10-20
5+
template = "blog-entry.html"
6+
+++
7+
8+
I just wanted to share this cool bash script I hacked together after finding an [esa API](https://view.eumetsat.int/geoserver/ows?service=WMS&request=GetMap&version=1.3.0&layers=mtg_fd:rgb_geocolour&styles=&format=image/png&crs=EPSG:4326&bbox=30,-15,59,38&width=2560&height=1440) that provides fresh satelite images every 10 minutes.
9+
10+
```bash
11+
#!/usr/bin/bash
12+
13+
SWAYBG_PID=""
14+
15+
while true
16+
do
17+
if [ -n "$SWAYBG_PID" ]; then
18+
sleep 600
19+
fi
20+
21+
curl --output "$HOME/Desktop/.bg.png" "https://view.eumetsat.int/geoserver/ows?service=WMS\
22+
&request=GetMap&version=1.3.0&layers=mtg_fd:rgb_geocolour\
23+
&styles=&format=image/png&crs=EPSG:4326\
24+
&bbox=30,-15,59,38\
25+
&width=2560&height=1440"
26+
27+
if [ -n "$SWAYBG_PID" ]; then
28+
kill "$SWAYBG_PID" 2>/dev/null
29+
fi
30+
31+
swaybg -i $HOME/Desktop/.bg.png &
32+
SWAYBG_PID=$!
33+
done
34+
```
35+
36+
There might be a better way to do this, but putting this into my autostart config works good enough for me. It should work on most wayland based compositors, although I only tested it on the new COSMIC compositor.
37+
38+
You can modify the displayed part of the earth by changing the `bbox` argument (minLat, minLong, maxLat, malLon) and adjust for different monitor sizes with the `width` and `height` arguments. Just make sure you stick with correct proportions – the api doesn't do that for you.

0 commit comments

Comments
 (0)