Skip to content

Commit 8988570

Browse files
committed
Added new keybind to expel active window from a vertical stack.
1 parent 84dbced commit 8988570

6 files changed

+16
-14
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ Swiping the trackpad horizontally with three fingers (only available in Wayland)
9999
| <kbd>Shift</kbd><kbd>Super</kbd><kbd>,</kbd> or <kbd>Shift</kbd><kbd>Super</kbd><kbd>.</kbd> | Move the current window to the left or right |
100100
| <kbd>Super</kbd><kbd>Ctrl</kbd><kbd>Left</kbd> or <kbd>Super</kbd><kbd>Ctrl</kbd><kbd>Right</kbd> | Move the current window to the left or right |
101101
| <kbd>Super</kbd><kbd>Ctrl</kbd><kbd>Up</kbd> or <kbd>Super</kbd><kbd>Ctrl</kbd><kbd>Down</kbd> | Move the current window up or down |
102-
| <kbd>Super</kbd><kbd>I</kbd> | Absorb the window to the right into the active column |
103-
| <kbd>Super</kbd><kbd>O</kbd> | Expel the bottom window out to the right |
102+
| <kbd>Super</kbd><kbd>I</kbd> | Absorb window into the active column |
103+
| <kbd>Super</kbd><kbd>O</kbd> | Expel the bottom window from vertical stack |
104+
| <kbd>Super</kbd><kbd>P</kbd> | Expel the active window from vertical stack |
104105
| <kbd>Super</kbd><kbd>C</kbd> | Center windows horizontally |
105106
| <kbd>Shift</kbd><kbd>Super</kbd><kbd>F</kbd> | Toggle fullscreen |
106107
| <kbd>Super</kbd><kbd>F</kbd> | Maximize the width of a window |

keybindings.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ export function setupActions(settings) {
289289
Meta.KeyBindingFlags.PER_WINDOW);
290290

291291
registerPaperAction('barf-out',
292-
Tiling.barf,
292+
(mw, _space) => Tiling.barf(mw),
293+
Meta.KeyBindingFlags.PER_WINDOW);
294+
295+
registerPaperAction('barf-out-active',
296+
(mw, _space) => Tiling.barf(mw, mw),
293297
Meta.KeyBindingFlags.PER_WINDOW);
294298

295299
registerPaperAction('toggle-maximize-width',

prefsKeybinding.js

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const actions = {
6363
'move-down',
6464
'slurp-in',
6565
'barf-out',
66+
'barf-out-active',
6667
'center-horizontally',
6768
'paper-toggle-fullscreen',
6869
'toggle-maximize-width',

schemas/gschemas.compiled

56 Bytes
Binary file not shown.

schemas/org.gnome.shell.extensions.paperwm.gschema.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,16 @@
317317

318318
<key type="as" name="slurp-in">
319319
<default><![CDATA[['<Super>i']]]></default>
320-
<summary>Consume the window to right into the active column</summary>
320+
<summary>Consume window into the active column</summary>
321321
</key>
322322
<key type="as" name="barf-out">
323323
<default><![CDATA[['<Super>o']]]></default>
324324
<summary>Expel the bottom window into its own column</summary>
325325
</key>
326+
<key type="as" name="barf-out-active">
327+
<default><![CDATA[['<Super>p']]]></default>
328+
<summary>Expel the active window into its own column</summary>
329+
</key>
326330

327331
<key type="as" name="resize-h-inc">
328332
<default><![CDATA[['<Super><Shift>plus']]]></default>

tiling.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -3316,7 +3316,7 @@ export function registerWindow(metaWindow) {
33163316
// Note: runs before gnome-shell's minimize handling code
33173317
signals.connect(metaWindow, 'notify::fullscreen', () => {
33183318
// if window is in a column, expel it
3319-
barfThis(metaWindow, metaWindow);
3319+
barf(metaWindow, metaWindow);
33203320

33213321
Topbar.fixTopBar();
33223322
spaces.spaceOfWindow(metaWindow)?.setSpaceTopbarElementsVisible(true);
@@ -4910,20 +4910,12 @@ export function slurp(metaWindow) {
49104910
});
49114911
}
49124912

4913-
/**
4914-
* Barfs (expels) the bottom window in a column.
4915-
* @param {Meta.Window} metaWindow
4916-
*/
4917-
export function barf(metaWindow) {
4918-
barfThis(metaWindow);
4919-
}
4920-
49214913
/**
49224914
* Barfs (expels) a specific window from a column.
49234915
* @param {Meta.Window} metaWindow
49244916
* @returns
49254917
*/
4926-
function barfThis(metaWindow, expelWindow) {
4918+
export function barf(metaWindow, expelWindow) {
49274919
if (!metaWindow)
49284920
return;
49294921

0 commit comments

Comments
 (0)