Skip to content
Proyek

Tentang

Meninjau kembali pengelolaan jendela di GNOME Shell.

Alat pengembangan

Cara angka ini diukur

Yang dapat Anda lakukan

  • Automatic mosaic layout using a radial packing algorithm
  • Miniature thumbnails when a workspace runs out of room, in most-recently-used order; click one to restore it
  • Overflow to another workspace for windows that cannot shrink any further
  • Edge tiling to halves and quarters by dragging to a screen edge, with the remaining windows adapting to what is left

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+4
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Mosaic WM

📣 Development journal on Mastodon: floss.social/@CleoMenezesJr

📣 Testers room on Matrix: #mosaicwm:matrix.org

A GNOME Shell extension that tiles windows automatically in a mosaic layout.

It is also a testbed for working out what mosaic tiling does in daily use, in enough detail to propose the model to Mutter and GNOME Shell. An extension puts the idea in front of real users fast, and you find out where it falls apart.

Project status

Early, and moving fast. Behaviour changes between commits, and something that worked last week may not work today.

  • Requires GNOME Shell 51. For GNOME Shell 50, check out the gnome-50 tag instead; it no longer receives updates.
  • Wayland is the target session.
  • I accept few code contributions right now. See Contributing.

Design goals

The starting point is Tobias Bernard's Rethinking Window Management. I treat that post as the premise. It describes the shape of the idea; this project tests that shape in daily use, where I let usability results overrule the original sketch.

Two places where I have pushed the design further than the post:

  • Miniatures are first-class members of the mosaic. When a workspace fills up, the least recently used window shrinks into a small live thumbnail and stays on screen, clickable, instead of moving to another workspace. Overflow to a new workspace is the fallback.
  • Quarter tiling as a general region model. Halves and quarters are regions the mosaic packs into. This is also the part most likely to be useful upstream, independent of the rest.

The principle behind both: you shouldn't have to think about window management. If a behaviour needs explaining before it makes sense, the behaviour is at fault.

Features

  • Automatic mosaic layout using a radial packing algorithm
  • Miniature thumbnails when a workspace runs out of room, in most-recently-used order; click one to restore it
  • Overflow to another workspace for windows that cannot shrink any further
  • Edge tiling to halves and quarters by dragging to a screen edge, with the remaining windows adapting to what is left
  • Window swapping by dragging one window onto another, or by keyboard shortcut
  • Dedicated workspaces for maximized and fullscreen windows
  • Windows grow back toward their preferred size when neighbours close or miniaturize
  • Quick Settings toggles for mosaic per workspace and globally, with a top bar indicator
  • Miniatures keep their scale and position across the Overview

Known limitations

  • Touch drag does not tile. Mutter does not expose the drag position to extensions, so the extension cannot tell where your finger is. It detects touch drags and skips edge tiling rather than guessing wrong. Fixing it properly needs a small addition to Mutter.
  • Multi-monitor needs a specific setting. It requires Workspaces on all displays (Settings → Multitasking). Workspaces on primary display only is not supported yet (#30).
  • No preferences UI. Keyboard shortcuts can only be changed with gsettings. Quick Settings covers the mosaic toggles and nothing else. This is deliberate for now, see below.
  • Drag and drop inside the Overview has rough edges.
  • The edge tiling overflow preview is not animated.

Where this is going

Priority order:

  1. Getting the default behaviour right, before adding any preferences. A preference added too early freezes a decision before testing validates it and leaves you supporting that decision. Testing should tell us which knobs deserve to exist.
  2. Real multi-monitor support, including Workspaces on primary display only, so I can drop the experimental label.
  3. Touch support, which needs a small addition to Mutter: a way for extensions to read the position of an in-progress window drag. Mutter tracks the number internally; JavaScript cannot reach it.
  4. The region model in Mutter, and the mosaic itself in GNOME Shell. This is the actual destination. The extension exists to make the case with something people have used.
  5. Preferences in GNOME Settings, after point 1.

Installation

git clone https://github.com/CleoMenezesJr/MosaicWM.git
cd MosaicWM
./scripts/build.sh -i

Then log out, log back in, and enable it:

gnome-extensions enable [email protected]

For everyday use rather than development, set const DEBUG = false; in extension/logger.js before installing. It defaults to true, which logs verbosely and costs CPU.

Usage

There is nothing to configure. Once enabled:

  • Opening a window tiles it into the mosaic.
  • Dragging a window reorders it, or tiles it to a half or quarter if you drag to an edge.
  • Dragging a window onto another swaps the two.
  • Maximizing or going fullscreen moves the window to its own workspace.
  • Minimizing takes a window out of the mosaic.
  • When the workspace is full, the least recently used window becomes a thumbnail. Click it to bring it back.

Development

npm install            # the pre-commit hook shells out to npx eslint
./scripts/setup-hooks  # symlinks .git/hooks/pre-commit, per clone

Run setup-hooks by hand after cloning: git hooks live outside the working tree, so the clone skips them. The hook runs ESLint over staged files, while CI runs ESLint over all of extension/, plus shexli and a build. Passing the hook does not mean CI will pass; CI is the real gate.

./scripts/build.sh -b        # build only
./scripts/build.sh -i        # build and install
./scripts/run-gnome-shell.sh # nested GNOME Shell session for testing
npm run lint

Keep DEBUG = true in extension/logger.js while developing. Logs go to the journal:

journalctl -f -o cat /usr/bin/gnome-shell | grep -i mosaic

Looking Glass (Alt+F2 → lg) shows extension errors under its Extensions tab. The GJS debugging guide covers the rest.

Contributing

I turn down most pull requests right now. The internals get rewritten often enough that a patch can collide with a refactor before anyone reviews it, and declining good work for that reason wastes your time and mine. Something small and self-contained can still land, so open an issue and ask before writing it. This gets easier once the architecture settles.

Useful work in the meantime:

  • Testing. Use it as your daily driver and push on the edge cases. This is the single most useful thing anyone can do, given the whole point is finding out where the design breaks under real use.
  • Bug reports with reproduction steps, your GNOME Shell version, and your monitor setup.
  • Design feedback. Disagreement about how a behaviour should work is more valuable here than a patch that implements it.

Anything that lands must satisfy the GNOME Shell Extensions Review Guidelines.

Support

This is unfunded work on a problem that will take a long time to finish properly. If you would like it to keep going, sponsorship is what makes the time available:

PayPal donation Ko-fi GitHub Sponsors

Acknowledgments

License

GNU General Public License v2.0 or later, the same license as Mutter and GNOME Shell. See LICENSE.

Jelajahi proyek terkait

Memuat…