PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

Scrolling workspace while dragging window

Open pomdtr opened this issue 5 years ago • 6 comments

The new mouse interactions are amazing, but it is still difficult to reorder windows without using the keyboard. It would be useful to be able to scroll to the right or to the left by dragging the selected window to the edge of the screen.

pomdtr avatar Feb 17 '20 23:02 pomdtr

Yeps, the basic interactions are pretty good, but there's some limitations still as you note. We're working on a branch (clutter-dnd: df0e1363f93ade49f816ba996a263482e78d675e) which makes it possible to navigate as normal while grabbing a window, including scrolling with the mouse.

@olejorgenb built a prototype of your suggestion, but we concluded having scroll with mouse and regular navigation was better.

hedning avatar Feb 18 '20 07:02 hedning

See #259, if you want to test things out. I've been using that branch for a quite a while now, so it should be usable. Though there's some minor issues left.

hedning avatar Mar 09 '20 09:03 hedning

The mouse interaction work really well ! However i'm not able to trigger the scrolling using a trackpad.

pomdtr avatar Mar 09 '20 22:03 pomdtr

Hmm, like 3/2-finger swipe while grabbing a window with the touchpad? That's probably difficult to achieve without a « grab lock», as any mouse-release/press events will drop the window. Not sure if it's possible to get the scroll events without a mouse-press/release. It might also be a bit weird that the finger movements suddenly doesn't track the grabbed window. Though if it's possible to make I'm open to be persuaded that it makes sense :)

Now, you can achieve a «lock» if you right-click on a window's titlebar and select «Move» (Alt-F7). This will take you straight into drag-and-drop mode where you can use 3-finger swipes to scroll (2-finger scroll should really be smooth, but will probably fix that after we've released the basics).

We'll probably also add <Super>W/E bindings to navigate left/right, which will make it much easier to navigate with only the left hand on the keyboard (#257).

There's also a few features which might not be that discoverable:

  • Navigating while grabbing a tiled window will detach the window immediately, no need to pull it down
  • Escape while navigating will bring back any grabbed window to where you started (doesn't work correctly when grabbing the starting window yet).
  • On wayland <Super><Ctrl>button-press will take you immediately to DnD mode (which is handy to move floating windows into the tiling).
  • As noted above, starting what gnome-shell calls a keyboard move (<Alt>F7 by default) will immediately activate DnD mode.

We intend to add a docking functionality, #194. That's perhaps the main reason why I'm hesitant to add auto-scrolling while hovering the monitor edges, since the docking feature will need that action.

hedning avatar Mar 09 '20 23:03 hedning

Alt+F7 was exactly what I was looking for. I used libinput-gestures to bind keyboard shortcut to swipe gestures. This config is working wonderfully, thanks a lot !

gesture swipe up	3 xdotool key super+s
gesture swipe down	3 xdotool key super+s
gesture swipe right	3 xdotool key super+Left
gesture swipe left	3 xdotool key super+Right

gesture swipe up	4 xdotool key alt+F7
gesture swipe down	4 xdotool key alt+F7
gesture swipe right	4 xdotool key super+control+Right
gesture swipe left	4 xdotool key super+control+Left

pomdtr avatar Mar 09 '20 23:03 pomdtr

We might add a better keybinding at some point (eg. <Super>G) and support grabbing more than one window at a time (so something like <Super>T, but with mouse integration). Gnome-shell also lets you <Super>middle-click anywhere on a window to bring up the headerbar right-click menu btw.

hedning avatar Mar 10 '20 00:03 hedning