anufrievroman / waypaper

GUI wallpaper manager for Wayland and Xorg Linux systems
https://anufrievroman.gitbook.io/waypaper
GNU General Public License v3.0
396 stars 27 forks source link

Multi-monitor support on all backends #85

Closed anufrievroman closed 1 month ago

anufrievroman commented 1 month ago

As we discussed with @CalfMoon in #84, there is no principal obstacle to supporting multi-monitors on all backends (i.e. swaybg and mpvpaper in addition to hyprpaper and swww that are already supporting). The only problem is that now we are using hyprpaper and swww backends to get information about plugged monitors. So, we need to write an independent function get_monitor_names() in common.py that would return plugged monitors on both Xorg and Wayland. Does anyone know a minimal and reliable way to get the monitor names? Some inspiration can be found in Azote but that's much too complex for such a simple task. Likewise, there are ways to get monitors via xrandr and wayland-info, but I wish there was something more simple...

CalfMoon commented 1 month ago

A python library could be used maybe? screeninfo is what i found.

anufrievroman commented 1 month ago

Nice, that looks perfect for the job

anufrievroman commented 1 month ago

Okay, that's reimplemented. I'll need to test different backends once I get my hands on the second monitor. @CalfMoon maybe now you can uncomment the monitor support for mpvpaper. Thanks again for the recommendation!

CalfMoon commented 1 month ago

So I noticed that you completely removed the check to see which background it is before adding option, however I belive it should still be done as wallutils and feh don't support the feature and I don't think its good idea to add buttons for features that don't exist.

Also another thing the condition for all conditional display is inside the *_display() function. Would it not be better to add the condition where the function is called?

anufrievroman commented 1 month ago

Yes, you are right, I missed that, thank you for PR.