Tomas-M / xlunch

Graphical app launcher for X with minimal dependencies
http://xlunch.org
GNU General Public License v3.0
219 stars 35 forks source link

Multimonitor setup #9

Closed synaptiko closed 7 years ago

synaptiko commented 7 years ago

It doesn't work well while using multimonitor setup. The area/icons are spread through all monitors without respect to alignment of the monitors (for example I have it cropped from top on two from three monitors).

I would expect some configuration for it or it could work similar to i3bar: it will be shown only on active monitor.

Tomas-M commented 7 years ago

I have no idea how to do this. Any suggestions? Thanks

Tomas-M commented 7 years ago

Please try this patch and let me know. It removes the current fullscreen hack, and implements a proper message which is sent to window manager (fullscreen request).

wm-fullscreen.patch.txt

synaptiko commented 7 years ago

@Tomas-M: It's better but still not correct.

If I run ./xlunch -r in my three display setup on any display I always see background of the most left display. Unfortunately I'm not able to trigger screenshot when in xlunch, so I cannot show it to you.

But without -r option it's at least much more usable than before.

Tomas-M commented 7 years ago

So that means the fullcsreen is now only on one display? In ideal case, does it run fullscreen only on the current display where you run it? I need more detailed description since I have only one monitor.

Tomas-M commented 7 years ago

If you modify the source, file xlunch.c, line 468, use 0, 1, or 2 hardcoded instead of the 'screen' variable, does it use wallpaper from your other screens?

I have no idea how this works and I have no way to experiment with this, so I'll need your help on this. Thanks!

synaptiko commented 7 years ago

@Tomas-M Sorry for the delay but I'm now on holiday and I will be able to answer until at least January.

Btw. Oracle VirtualBox could be useful for multimonitor debugging: http://superuser.com/questions/109485/virtualbox-to-use-dual-monitors#207291

Tomas-M commented 7 years ago

Thanks, this helped! :) I am now running multiple monitors and I can confirm it is not much usable since the width and height of the launcher is set to total width of all monitors combined. I need to find a way how to get infos about current monitor or something.

Tomas-M commented 7 years ago

So here is a conclusion. It is possible to find out monitor screen sizes using xrandr extension. However I was not able to find out how to detect what monitor is currently 'active' thus if the display resolution is different on both, there is now way AFAIK how to know which resolution should be used. The window manager can actually put the application's window on any screen it wants.

So I added just some parameters for users to adjust width/height of the launcher manually. You should be able to configure your window manager to display the launcher on your desired screen, and use -y and -z parameters to specify width and height of it.

I fully understand this is not perfect. But I am not skilled enough to make it better :) Patches welcome! :)

Tomas-M commented 7 years ago

One more thing to note, xlunch now understands notifications about window size changes. So as soon as your Window Manager catches the window and puts it either to some screen or to some monitor, xlunch should resize its window accordingly.

So basically you should be able to start xlunch now on any monitor. I tested with i3wm and it placed the launcher on the current screen where is mouse cursor.

synaptiko commented 7 years ago

@Tomas-M Great, this should work for me too as I'm also using i3wm. I'll test it later and maybe it's good enough behavior to resolve and close this issue…

Tomas-M commented 7 years ago

ok closing. Reopen if you find any problems. Thanks