Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Span same image across different monitors #121

Open
villamide opened this issue May 27, 2023 · 2 comments
Open

Span same image across different monitors #121

villamide opened this issue May 27, 2023 · 2 comments
Labels

Comments

@villamide
Copy link

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
Copy link
Owner

LGFae commented May 30, 2023

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
Copy link
Author

villamide commented May 31, 2023

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

@LGFae LGFae added the script label Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants