LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.29k stars 67 forks source link

Span same image across different monitors #121

Open villamide opened 1 year ago

villamide commented 1 year ago

Hi there!

Is there any way to span a ultrawide wallpaper across in two monitor setup. I cannot find the way to do it, I have just been able to put the same image twice (one in each monitor) or use different images for it. I also have been able to trick this effect by cropping the images with GIMP and then setting each image for the respective monitor.

I was wondering if there's any way to achieve this natively. Since I was trying to implement an script to change background and i don't want to complicate it to much dividing all images I get.

This is my screen configuration in Hyprland.

monitor=DP-2, 2560x1440@60, 0x0, 1 monitor=DP-1, 2560x1440@144, 2560x0, 1

Regards and thanks in advance

LGFae commented 1 year ago

Sorry man, I think you will have to go ahead and complicate it. swww can display images read from stdin, so you can probably use a complicated imagemagick of ffmpeg command to divide your image in two and just pipe it into swww:

complicated-command-that-divides-the-image-first-half img | swww --outputs DP-2 -
complicated-command-that-divides-the-image-second-half img | swww --outputs DP-1 -

Editing the image ourselves would be somewhat complicated, I don't really think I'd like to support that. Right now the only image editing we do is resizing and padding, which, if you think about it, are the edits we absolutely must do. I'd rather avoid complicating it further right now.

villamide commented 1 year ago

Okay. Thank you. I've achieved it with a really simple script. But I was thinking maybe it could be a "native" way to do it.

Here is the script in case is somewhat useful for anyone

#!/bin/bash
wallpapers=$HOME/pictures/wide
random=$(ls $wallpapers | shuf | head -1)
random=$wallpapers/$random

# split image
convert -crop 50%x100% $random /tmp/output.png

swww img -o "DP-2" --transition-type random /tmp/output-0.png
swww img -o "DP-1" --transition-type random /tmp/output-1.png