Create wallpapers that span perfectly across multiple monitors with different resolutions, scaling settings, and physical sizes.
You can use spanpaper directly in your browser on karl-funke.com/spanpaper if you dont want to run it locally. The online Version does the same exact thing, it uses this code slightly adapted to work with my api.
Original Image:
Transformed by spanpaper:
Applied on my setup (I Need to buy monitors with matching colors...):
Example image from Jonny Gios on Unsplash.
This tool currently supports Linux Systems using GNOME on X11 only (Ubuntu's default for example).
It will probably not work with Wayland or on Windows or on Mac.
- Linux system with GNOME on X11 (not Wayland)
- Python 3
- Pillow library
-
Download the
create_wallpaper.pyscript or clone the repo. -
Install the required library:
pip install pillow
-
Open the script in a text editor.
-
Configure your monitor layout at the top of the file:
- Enter resolution, scaling, physical size (in inches), aspect ratio, and optional vertical offset.
- Define the gaps (in inches) between monitors.
- Optionally add your xrandr output if monitors are not bottom-aligned.
Configure monitors from LEFT to RIGHT:
- Resolution: Your monitor's resolution. Choose a preset or enter pixels manually.
- Scaling Factor: The scaling factor you set in system settings (e.g., 100% = 1.0, 150% = 1.5).
- Size (inches): The physical size of your monitor in inches (diagonal measurement).
- Aspect Width and Height: The aspect ratio of your monitor (e.g., 16 and 9 for a 16:9 display).
- Bottom Offset: The physical offset to the lowest monitor in inches. Set the lowest monitor to 0, and others to how much higher their bottoms are.
- Gap after monitor: The size of the gap between this monitor and the next one in inches.
Use this field only if your monitors are not bottom-aligned in your system settings.
Bottom-aligned: You don't need xrandr output
Not bottom-aligned: You need xrandr output
If you need it: Open your terminal, run the following command, and paste the entire output into the xrandr_output variable in the script:
xrandrThe system will automatically calculate the pixel offsets needed to align your wallpaper correctly.
Run the script with your input image and specify an output path:
python3 create_wallpaper.py input_image.jpg output_path.pngThe script accepts common image formats (PNG, JPEG, JPG, WEBP, GIF, AVIF) and will generate a PNG file that spans perfectly across your configured monitors.
If you don't have GNOME Tweaks installed, install it using your package manager:
sudo apt install gnome-tweaks # For Ubuntu/Debian
sudo dnf install gnome-tweaks # For Fedora
sudo pacman -S gnome-tweaks # For Arch LinuxTo apply the wallpaper:
- Open GNOME Tweaks
- Go to Appearance > Background
- Set the image to the generated wallpaper
- Set Adjustment to Spanned
Do whatever you want with it. See LICENSE file for details.




