timbertson / slinger

gnome-shell extension for throwing windows around efficiently
134 stars 11 forks source link

Keyboard shortcuts stopped working across monitors #25

Open moben opened 4 years ago

moben commented 4 years ago

e.g. win+j and win+k only switch between windows on the currently focused monitor. I distinctly remember these shortcuts working across monitors a while ago, though sadly I can't pin-point when exactly it stopped working.

I am quite fond of this feature because it feels so much snappier than any version of alt-tab in upstream gnome-shell, so if this was intentional I would greatly appreciate an option to change it back.

This is on gnome-shell 3.30.2 with the slinger version currently pushed to extensions.gnome.org on 2019-11-06.

moben commented 4 years ago

It seems like this was introduced by https://github.com/timbertson/slinger/commit/1382837cee838844f111153d57b40d742d08bf96. I reverted that change manually and shortcuts work across monitors again.

I think it would make sense to have some commands like window switching and swapping work across monitors and others, like splat only on one monitor at a time.

timbertson commented 4 years ago

Hmm, I can see an argument for both options. When I use multiple monitors, they're mostly independent, so I wouldn't want flipping through windows to change my active monitor. And splat should definitely only affect the current monitor.

What if we added an addition two explicit keybindings for next/previous monitor? If we activate the frontmost window on the given monitor, that should be stable (i.e. swapping between two monitors twice shouldn't change the active window)

How about mod4+ctrl+[j/k]? Or mod4+alt+[h/l], as the dual of workspace up/down, monitor left/right. It might feel a bit odd if you stack your monitors vertically, but otherwise works pretty well. We can then add [shift] to bring the current window with you to the new monitor.

moben commented 4 years ago

That sounds good to me, assuming it also moves focus to the window on the other monitor.

I assume you could do something like segment the recent windows/alt-tab list by monitor and then focus the last window that was active on the target monitor.

My use case is basically that I often have a maximized window on one or both of the monitors and just want to switch focus quickly between e.g. my tmux terminal and browser so a dedicated monitor switching shortcut would work nicely.