sonnyp / Junction

Application/browser chooser
https://flathub.org/apps/re.sonny.Junction
GNU General Public License v3.0
458 stars 29 forks source link

Center Junction window under cursor #35

Closed chase9 closed 2 years ago

chase9 commented 2 years ago

There is an application for Mac called bumpr which provides much of the same functionality. They default to placing the window under your cursor, which I believe to be the best UI for an application like this.

sonnyp commented 2 years ago

That's not reasonably doable under Wayland.

sonnyp commented 2 years ago

https://wayland-book.com/xdg-shell-in-depth/interactive.html https://gitlab.gnome.org/GNOME/mutter/-/issues/316

Positioning a window is possible but there is no way to retrieve the cursor coordinates.

https://wayland-book.com/seat/pointer.html

dac73 commented 2 years ago

@sonnyp is it possible at least to get it centered (via config). Currently, I just forced center all windows via gnome-tweaks, but would like to do it just for Junction.

sonnyp commented 2 years ago

Possibly but GNOME Shell doesn't support it https://gitlab.gnome.org/GNOME/mutter/-/issues/316

dac73 commented 2 years ago

There is this org.gnome.mutter center-new-windows dconf setting as a half-solution. :man_shrugging:

Although it's interesting that Ulauncher somehow does it.

sonnyp commented 2 years ago

There is this org.gnome.mutter center-new-windows dconf setting as a half-solution.

How is that a solution to centering Junction only?

It's already documented in the README.md :+1:

Although it's interesting that Ulauncher somehow does it.

It's not a wayland app

https://github.com/Ulauncher/Ulauncher/blob/dev/ulauncher.service

GDK_BACKEND=x11