varietywalls / variety

Wallpaper downloader and manager for Linux systems
http://peterlevi.com/variety
GNU General Public License v3.0
1.16k stars 140 forks source link

Multi monitor support #96

Open utzmobil opened 5 years ago

utzmobil commented 5 years ago

Multiple monitors Do you plan to support a multiple monitor setup? It would be a great feature to use for the people with more than one monitor to span the background over all the monitors in use.

jlu5 commented 5 years ago

See related bugs on the Launchpad tracker: https://bugs.launchpad.net/variety/+bug/1132140 https://bugs.launchpad.net/variety/+bug/1160603 https://bugs.launchpad.net/variety/+bug/1096035

The biggest obstacle to multi-monitor support is that it's complicated. We don't yet have the abstraction to deal with multiple wallpapers / setting wallpaper modes, and a proper multi-monitor implementation would certainly require those. If you're interested in span, maybe try the workaround posted at https://bugs.launchpad.net/variety/+bug/1132140/comments/5

mayank-imeleo commented 4 years ago

Is there a way to decide what monitor should the quote be displayed on?

In my current set-up (3 monitors) it's split b/w 2 monitors. I have to adjust quote settings (top\bottom, narrow\wide) to make it sit on the middle monitor.

I would love to see a way I can display the quote on a particular monitor or all the monitors.

wleoncio commented 3 years ago

Regarding OP's request for the ability to "span the background over all the monitors in use", if you're on i3 (or any other of the "simple WMs" listed below) and using nitrogen, the set_wallpaper script is already set to span (see here).

This will not work if you have both nitrogen and feh installed, though. The problem is that the aforementioned line of code is wrapped inside the following statement:

https://github.com/varietywalls/variety/blob/f7b7a1b70b3a3622c0777626d1bc247c75e0bdc7/data/scripts/set_wallpaper#L213-L221

Meaning the script will use feh with the bg-fill option, which doesn't span the wallpaper across monitors. I can't think of a clever solution for this, so I just swapped the statements in my installation to use nitrogen first.

@jlu5, I wonder if this warrants a PR. I posit that nitrogen (a popular software among i3 users) should be made the first app to be checked for, with feh being used as fallback. If the user is only using one monitor, nitrogen --set-zoom-fill will not hurt anyway...

strowi commented 3 years ago

Would love to see this. Another idea would be to iterate over all monitors:

  1. change background on monitor1
  2. change background on monitor2
  3. change background on monitor3
  4. change background on monitor1
  5. ...
an4s911 commented 2 years ago

See related bugs on the Launchpad tracker: https://bugs.launchpad.net/variety/+bug/1132140 https://bugs.launchpad.net/variety/+bug/1160603 https://bugs.launchpad.net/variety/+bug/1096035

The biggest obstacle to multi-monitor support is that it's complicated. We don't yet have the abstraction to deal with multiple wallpapers / setting wallpaper modes, and a proper multi-monitor implementation would certainly require those. If you're interested in span, maybe try the workaround posted at https://bugs.launchpad.net/variety/+bug/1132140/comments/5

Multi monitors works like this with nitrogen:

nitrogen --head=0 --set-scaled wallpaper1.jpg
nitrogen --head=1 --set-scaled wallpaper2.jpg

I hope to see this soon in variety.

utzmobil commented 2 years ago

Thanks a lot for answering, still a slow work in progress, i suppose. The feature to set multiple monitors with variety is really just a "nice to have", with nitrogen i get no change af wallpapers, though ^^

wleoncio commented 2 years ago

with nitrogen i get no change af wallpapers, though

you can put nitrogen to run through cron to get the auto-switching 😉

yhilgjff commented 10 months ago

Would love to see this. Another idea would be to iterate over all monitors:

1. change background on monitor1

2. change background on monitor2

3. change background on monitor3

4. change background on monitor1

5. ...

What I would like is for those 3x background changes to happen at their own intervals and source.

For example: Monitor 1: fetch NASA picture and change every 5 minutes Monitor 2: use only selected local folder and change every 15 minutes Monitor 3: use BING, APOD & UNSPLASH and change every 1 hour etc.

rcooke commented 9 months ago

I was going to add this as a new feature request, but I saw this one already exists. So instead I will mention here that some of the desired functionality is implemented in program hydrapaper: https://gitlab.com/gabmus/HydraPaper

Its written in Python, so we could easily use it for the mechanics of multi-monitor image deployment. Using the existing logic to source images. or whatever....

Ash-Crow commented 9 months ago

@rcooke Hydrapaper doesn't really manages multiple monitors. It simulates it by stitching several images together into a single one. Which is fine if your setup never changes but means that if, for example, you unplug your laptop from your home office and use it on the move and only have one monitor instead of several, you now have a weirdly deformed patchwork as a desktop background.

chancezeus commented 5 months ago

Running into various situations where the wrong monitor got used as primary (apparently get_primary_monitor returns None on my system) and/or images were cropped that shouldn't have to be, I decided spend my free Sunday trying to improve the "Fit and blur" mode of Variety, after some trail and error, I ended up with something that seems to work and that should be able to generate an image that should work for every possible combination of screen sizes (I myself run a 2560x1080 monitor combined with a 3840x2160 laptop screen).

How does it work:

I've uploaded a zip file to my Google Drive containing:

If anyone is interested, they can get the zip here: https://drive.google.com/file/d/1v6-FnyP2WRMKY3RlwUTA9J7i-7CX_wBc/view?usp=sharing

Just to be clear, I'm no Python dev at all, just know enough to hack something together if I want/have to, that's it. That's also the reason why I didn't create a PR with the change since there's likely a ton of things that can be done better/different.

Edit: note, this does not place different images on different screens, what this does is make sure that a single image is scaled to fit as nice as it can on all screens