From a15c21cb426ad3bd5477e4a962cfce7ad61ef2e1 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Mon, 8 Jan 2024 20:51:43 +1100 Subject: [PATCH 1/7] Updated metadata.json. --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 0234e4f5..6c50482b 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45" ], - "version-name": "45.7.0" + "version-name": "45.8.0" } From e2de6b168af5e258359ef7099f7b2f3f31b78285 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Fri, 12 Jan 2024 01:15:10 +1100 Subject: [PATCH 2/7] Updated metadata.json. --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 6c50482b..9007e46a 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45" ], - "version-name": "45.8.0" + "version-name": "45.8.1" } From f6d4a9cd39fc98a6a6713f266351a7631084d137 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Sat, 27 Jan 2024 14:26:34 +1100 Subject: [PATCH 3/7] Updated metadata.json. --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 9007e46a..3c2f4b01 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45" ], - "version-name": "45.8.1" + "version-name": "45.9.0" } From 35afc1a117650dbd9b7ee2afccc691e0b4514e89 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Mon, 29 Jan 2024 02:02:39 +1100 Subject: [PATCH 4/7] Updated metadata.json. --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 3c2f4b01..75d6b4e1 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45" ], - "version-name": "45.9.0" + "version-name": "45.9.1" } From d280bc743d15d869bdbbeb8e410fd3a88e9d17a5 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Wed, 7 Feb 2024 20:11:04 +1100 Subject: [PATCH 5/7] Updated metadata.json --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index 75d6b4e1..7e26f334 100644 --- a/metadata.json +++ b/metadata.json @@ -5,5 +5,5 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45" ], - "version-name": "45.9.1" + "version-name": "45.9.2" } From 7c776d91ffda61a7c2b919a8a6745f9f15cb33cc Mon Sep 17 00:00:00 2001 From: dawser Date: Wed, 7 Feb 2024 14:54:19 +0100 Subject: [PATCH 6/7] Added switch-global-* actions --- keybindings.js | 5 ++ prefsKeybinding.js | 4 + schemas/gschemas.compiled | Bin 7981 -> 8197 bytes ...gnome.shell.extensions.paperwm.gschema.xml | 17 ++++ tiling.js | 74 ++++++++++++++++++ 5 files changed, 100 insertions(+) diff --git a/keybindings.js b/keybindings.js index 7a396ee6..c1ff536e 100644 --- a/keybindings.js +++ b/keybindings.js @@ -172,6 +172,11 @@ export function setupActions(settings) { registerMinimapAction("switch-up", (mw, space) => space.switchUp()); registerMinimapAction("switch-down", (mw, space) => space.switchDown()); + registerMinimapAction("switch-global-right", (mw, space) => space.switchGlobalRight()); + registerMinimapAction("switch-global-left", (mw, space) => space.switchGlobalLeft()); + registerMinimapAction("switch-global-up", (mw, space) => space.switchGlobalUp()); + registerMinimapAction("switch-global-down", (mw, space) => space.switchGlobalDown()); + registerMinimapAction("move-left", (mw, space) => space.swap(Meta.MotionDirection.LEFT)); registerMinimapAction("move-right", diff --git a/prefsKeybinding.js b/prefsKeybinding.js index 47881ff1..9c4539ee 100644 --- a/prefsKeybinding.js +++ b/prefsKeybinding.js @@ -27,6 +27,10 @@ const actions = { 'switch-right', 'switch-up', 'switch-down', + 'switch-global-left', + 'switch-global-right', + 'switch-global-up', + 'switch-global-down', 'switch-first', 'switch-last', 'live-alt-tab', diff --git a/schemas/gschemas.compiled b/schemas/gschemas.compiled index d42b14facba1a729152cefd9f66f84153109eb15..5f7b8042fd60646a27bbca3b8fe3812191495060 100644 GIT binary patch literal 8197 zcmb7J3vdYGHHl=H4Cl-o4%36>m5z@F0gYB``k+P!JB+q9wnJqKt@vo|_nou5_kkAOnJ?d$ zf6t!%&-wrJ+I!Wtnr&!FSMjd#;QdmE3Ow6I;C{fxK!4!e)mzTd#&Q+PQso4=4u*m; zit-7rZM>;0Q^@xMe_pxid77xpP`;b?fhgNJx03b~mnzCM*p))m2L~pNdGQ(AH%w8K z*|6^icU-P0mK`gLC9Q;B=EQZ=EYmw&J?R)$(kV-6Dcw#d%F>p--brZ@-83AwDMX+B zi*3-x-gh&Z{`Obem4)DDplid%A@rTP0QTkJ&D36-sM)65z-*USKi;4@rFgv?=Y2&f zhm+;P$#UUjdB(|d&&l$@NvB*<9Qhpmq+je`UZ10_>-EkSBN;W4Fee4cqV1M%wu9|PXsvbKbF z>O$C0f1=y_#WV)!5{0iQxAfD7x)mM&N;k=cIr{E_kiC4{QRS4{+$LFBS`6fr7yEQ^=R1Z zz}ErK9eB8!c53>W0^b5`I{<4D5B_tAIi8j5tiY(6BFuZ5^=r_*r46ravj#fURHo zOBc&i3qQe+04M+T#>cc%vt3=_V?aqsdM54EgJJIh7b1a|JyCEw?bPF7uK+Ir2F)M) zZQ7~X&uhSG;QHGiSWG*$h!^-iAXfX&A+%GEMEQf@CxDv^e)VdFt z0^b2V^{v9EX{Tmfc7cBZ+`G#WainJ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NFRT)Y$?W5gY`%W_>S<((~f-GZk7pG2gRM}UHF#FxIfG|$o>yoG&lEgEvn|geJlkLk6K9(| zFwZtTi!f(+4(G-55RL`ntj;s~e1PYje1OY6=QWmPapvJUhvz209$@VtmzZuXgCDqj zfA}sAqT;Al+8n?itU}0MJ8%H}9xi(2B>lqq>BT#D9hM27v(AJ9=C4-%I_1xoG0QMU zz;&LMeqPEU-~6n^Ji|1D#RK7WzN`G}EE>XVN`!IrFUE&)@j;tEK7HH`{LTNX@;mhd z;75U^J^BXqlzB!P0>1?Kdo*Q!H$MO#0any3Ens`fJPRELe+aCcbgTG3D`ozll?jm# z{AT(+qCI7{F9a6>TW4Switch to the below window + + + Switch to the right window (no monitor boundary) + + + + Switch to the left window (no monitor boundary) + + + + Switch to the above window (no monitor boundary) + + + + Switch to the below window (no monitor boundary) + + Home']]]> Switch to the first window diff --git a/tiling.js b/tiling.js index 12c6f0d1..cce2d2ee 100644 --- a/tiling.js +++ b/tiling.js @@ -1071,6 +1071,80 @@ export class Space extends Array { ensureViewport(metaWindow, space); } + switchGlobalLeft() { this.switchGlobal(Meta.MotionDirection.LEFT); } + switchGlobalRight() { this.switchGlobal(Meta.MotionDirection.RIGHT); } + switchGlobalUp() { this.switchGlobal(Meta.MotionDirection.UP); } + switchGlobalDown() { this.switchGlobal(Meta.MotionDirection.DOWN); } + switchGlobal(direction) { + let space = this; + let index = space.selectedIndex(); + if (index === -1) { + return; + } + let row = space[index].indexOf(space.selectedWindow); + + switch (direction) { + case Meta.MotionDirection.RIGHT: + index++; + break; + case Meta.MotionDirection.LEFT: + index--; + } + if (index < 0 || index >= space.length) { + let monitor = focusMonitor(); + let dir = (index < 0)? + Meta.DisplayDirection.LEFT : Meta.DisplayDirection.RIGHT; + let i = display.get_monitor_neighbor_index(monitor.index, dir); + if (i === -1) + return; + + let newMonitor = Main.layoutManager.monitors[i]; + space = spaces.monitors.get(newMonitor); + if (dir == Meta.DisplayDirection.LEFT) { + index = space.length - 1; + } else { + index = 0; + } + if (space[index].length <= row) + row = space[index].length - 1; + space.activate(false, false); + } + + let column = space[index]; + if (column.length <= row) + row = column.length - 1; + + switch (direction) { + case Meta.MotionDirection.UP: + row--; + break; + case Meta.MotionDirection.DOWN: + row++; + } + if (row < 0 || row >= column.length) { + let monitor = focusMonitor(); + let dir = (row < 0)? + Meta.DisplayDirection.UP : Meta.DisplayDirection.DOWN; + let i = display.get_monitor_neighbor_index(monitor.index, dir); + if (i === -1) + return; + + let newMonitor = Main.layoutManager.monitors[i]; + space = spaces.monitors.get(newMonitor); + if (space.length <= index) + index = space.length - 1; + if (dir == Meta.DisplayDirection.UP) { + row = space[index].length - 1; + } else { + row = 0; + } + space.activate(false, false); + } + + let metaWindow = space.getWindow(index, row); + ensureViewport(metaWindow, space); + } + /** * Return the x position of the visible element of this window. */ From c0c9b7537769368108a39453608014ba03db285b Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Thu, 8 Feb 2024 22:01:48 +1100 Subject: [PATCH 7/7] Added fluid minimap navigation (when jumps to new monitor). Applied linting standards. --- navigator.js | 4 ++-- tiling.js | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/navigator.js b/navigator.js index 15319098..8460b86a 100644 --- a/navigator.js +++ b/navigator.js @@ -199,7 +199,7 @@ class ActionDispatcher { } if (!Tiling.inGrab && action.options.opensMinimap) { - nav._showMinimap(space); + nav.showMinimap(space); } action.handler(metaWindow, space, { navigator: this.navigator }); if (space !== Tiling.spaces.selectedSpace) { @@ -286,7 +286,7 @@ class NavigatorClass { this.space.startAnimate(); } - _showMinimap(space) { + showMinimap(space) { let minimap = this.minimaps.get(space); if (!minimap) { let minimapId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 200, () => { diff --git a/tiling.js b/tiling.js index cce2d2ee..ea133626 100644 --- a/tiling.js +++ b/tiling.js @@ -1092,15 +1092,15 @@ export class Space extends Array { } if (index < 0 || index >= space.length) { let monitor = focusMonitor(); - let dir = (index < 0)? - Meta.DisplayDirection.LEFT : Meta.DisplayDirection.RIGHT; + let dir = index < 0 + ? Meta.DisplayDirection.LEFT : Meta.DisplayDirection.RIGHT; let i = display.get_monitor_neighbor_index(monitor.index, dir); if (i === -1) return; let newMonitor = Main.layoutManager.monitors[i]; space = spaces.monitors.get(newMonitor); - if (dir == Meta.DisplayDirection.LEFT) { + if (dir === Meta.DisplayDirection.LEFT) { index = space.length - 1; } else { index = 0; @@ -1108,6 +1108,8 @@ export class Space extends Array { if (space[index].length <= row) row = space[index].length - 1; space.activate(false, false); + Navigator.finishNavigation(); + Navigator.getNavigator().showMinimap(space); } let column = space[index]; @@ -1123,8 +1125,8 @@ export class Space extends Array { } if (row < 0 || row >= column.length) { let monitor = focusMonitor(); - let dir = (row < 0)? - Meta.DisplayDirection.UP : Meta.DisplayDirection.DOWN; + let dir = row < 0 + ? Meta.DisplayDirection.UP : Meta.DisplayDirection.DOWN; let i = display.get_monitor_neighbor_index(monitor.index, dir); if (i === -1) return; @@ -1133,12 +1135,14 @@ export class Space extends Array { space = spaces.monitors.get(newMonitor); if (space.length <= index) index = space.length - 1; - if (dir == Meta.DisplayDirection.UP) { + if (dir === Meta.DisplayDirection.UP) { row = space[index].length - 1; } else { row = 0; } space.activate(false, false); + Navigator.finishNavigation(); + Navigator.getNavigator().showMinimap(space); } let metaWindow = space.getWindow(index, row);