domferr / domferr/tilingshell

Prefer maximize on first Super+Up before tile navigation

Open
#606 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

## Problem

When Tiling Shell move keybindings are enabled, pressing Super + Up on a tiled or partially tiled window first moves/snaps the window to another tile, and only a second Super + Up maximizes it.

This differs from vanilla GNOME behavior, where Super + Up maximizes the focused window directly. It also makes the common GNOME shortcut feel surprising when Tiling Shell is installed: the shortcut still looks like the normal maximize shortcut, but it now prioritizes tile navigation.

## Expected behavior

There should be a way for Super + Up to maximize/full-screen the focused window on the first press, while still keeping Tiling Shell keyboard movement for left/right or for a separately configured up/down binding.

Possible solutions:

1. Add an option for `move-window-up` to prefer maximize before tile navigation when the binding is Super + Up.
2. Split the native override behavior so users can keep GNOME native `maximize`/`unmaximize` on Super + Up/Down while still using Tiling Shell movement on Super + Left/Right.
3. Do not clear GNOME native `maximize`/`unmaximize` if the Tiling Shell `move-window-up/down` bindings are unset or remapped elsewhere.

## Actual behavior

With move keybindings enabled:

1. Focus a window that is tiled/snapped, for example to the left half.
2. Press Super + Up.
3. The window moves/snaps to a tile/section first.
4. Press Super + Up again.
5. The window maximizes only on the second press.

## Why this seems to happen

In `src/keybindings.ts`, enabling move keybindings calls `_overrideNatives()`, which clears GNOME native keybindings for:

- `org.gnome.desktop.wm.keybindings maximize`
- `org.gnome.desktop.wm.keybindings unmaximize`
- `org.gnome.mutter.keybindings toggle-tiled-left`
- `org.gnome.mutter.keybindings toggle-tiled-right`

Then Tiling Shell registers `move-window-up` on Super + Up.

In `src/components/tilingsystem/tilingManager.ts`, `onKeyboardMoveWindow()` maximizes on UP only when the current assigned tile is already at `y === 0`, or when no destination tile is found. If a tile destination exists, tile movement wins before maximize.

## Workaround limitations

Disabling Tiling Shell move keybindings restores vanilla GNOME Super + Up, but also disables the extension keyboard movement for the arrow keys.

Unsetting or remapping only `move-window-up` does not appear to be enough, because the native GNOME `maximize` keybinding is still cleared while move keybindings are enabled. This overlaps with #513, but the user-visible request here is specifically about preserving the vanilla maximize-first behavior for Super + Up.

Related: #440, #513

## Environment

- Tiling Shell package version: 76, extension version appears to correspond to 17.3 on extensions.gnome.org
- GNOME Shell: 50.2
- OS: NixOS 26.11
- Session: Wayland

Contributor guide

Open the contributing guide

Research direction

Start in src/keybindings.ts, tracing _overrideNatives() and the move-window-up binding, then follow onKeyboardMoveWindow() in src/components/tilingsystem/tilingManager.ts. Compare the native maximize/unmaximize handling with the tile-destination logic and related issues #440 and #513. Done means Super+Up maximizes the focused window on its first press while the other movement bindings remain usable and configured native bindings are preserved appropriately.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.