PaperWM
PaperWM copied to clipboard
Wrap around the window switcher?
Is it possible to wrap around when the end of the window sequence is reached in either direction?
Thank you for this extension, it's great!
Glad you like it :) Input is always appreciated.
We have decided against wrap-around.
- The wrap-around feels disturbing (to me at least) when happening by accident (a perfect animation might help)
- Holding down left/right wouldn't work as a shorthand[1] for first/last if wrap-around was enabled.
- Nailing the wrap-around animation is not trivial (the wrap-around should be noticeable without being too disturbing) The default animation didn't work very well for wrap-around IIRC.
If you want to try the default animation experience apply this patch and restart gnome-shell:
diff --git a/tiling.js b/tiling.js
index a0c2542..5f380de 100644
--- a/tiling.js
+++ b/tiling.js
@@ -730,11 +730,11 @@ class Space extends Array {
let row = space[index].indexOf(space.selectedWindow);
switch (direction) {
case Meta.MotionDirection.RIGHT:
- index++;
+ index = (index+1) % space.length;
row = -1;
break;;
case Meta.MotionDirection.LEFT:
- index--;
+ index = (index-1 + space.length) % space.length;
row = -1;
}
if (index < 0 || index >= space.length)
(only works for super-left/right, not super-,/.)
[1] Best enjoyed with reduced key-repeat delay though.
I appreciate the quick response, the explanation and the patch. Cheers!
Closing as question was answered.