mirror of
https://github.com/deunix-educ/sourizz.git
synced 2026-11-25 04:39:43 +01:00
State plainly that GNOME's Wayland session is unsupported, and where Sourizz works
The READMEs get a status column in the compatibility table (tested, not tested, not supported), an opening line about the supported desktops, and a clear paragraph on GNOME: no layer-shell, XWayland is no workaround, and the Xorg session is gone from GNOME 49. The error message on such a compositor says the same. The decision is recorded in CLAUDE.md; the handoff note is removed since its content has been absorbed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
> **Pending:** the GNOME part of the field test is still to do (KDE Wayland is done). If that is why you are here, read `docs/handoff-wayland-gnome.md` first.
|
||||
|
||||
## What this is
|
||||
|
||||
Sourizz is a Linux cursor highlighter (spotlight, ring, trails, click effects, keystroke display, on-screen drawing) for X11 and Wayland, written in Rust. It is an independent re-implementation of the idea behind the macOS app Mouzz. READMEs exist in English (`README.md`) and French (`README.fr.md`); keep them in sync. Licensed `AGPL-3.0-or-later` (`LICENSE`): new dependencies must be licence-compatible (MIT/Apache-2.0/BSD-style are fine).
|
||||
|
||||
GNOME's default Wayland session is **deliberately unsupported** (decision of 2026-10-30, stated in both READMEs): Mutter has no layer-shell and a GNOME Shell extension was judged too costly. Sourizz runs on GNOME only through its Xorg session (GNOME 48 and earlier). Do not start extension work unless Denis asks for it.
|
||||
|
||||
## Commands
|
||||
|
||||
```sh
|
||||
|
||||
+12
-8
@@ -41,6 +41,8 @@ Différences et manques :
|
||||
|
||||
## Installation
|
||||
|
||||
**Fonctionne sur** KDE Plasma (X11 et Wayland), GNOME sous Xorg et les bureaux X11 avec composition ; les compositeurs Wayland de type wlroots (Hyprland, sway…) devraient fonctionner mais ne sont pas testés. **Ne fonctionne pas sur la session Wayland par défaut de GNOME.** Détails dans le [tableau de compatibilité](#x11-et-wayland).
|
||||
|
||||
Il faut une [chaîne d'outils Rust](https://rustup.rs) stable récente (développé avec la 1.98 ; le projet utilise l'édition 2024). **Aucun paquet `-dev` n'est nécessaire** : la compilation est en Rust pur et charge `libxkbcommon` à l'exécution. La première compilation prend quelques minutes car la fenêtre de réglages embarque egui ; `cargo build --release --no-default-features` compile le démon seul. Si Rust est absent, `./install.sh` propose de l'installer avec rustup (il faut `curl` ou `wget` et un éditeur de liens C comme `build-essential` ; ajoutez `--yes` pour ne pas poser la question).
|
||||
|
||||
```sh
|
||||
@@ -142,15 +144,17 @@ spotlight = "Ctrl+Alt+Shift+S"
|
||||
|
||||
Sourizz a un seul moteur de dessin et deux backends d'affichage ; il choisit le bon automatiquement (`--backend x11|wayland` ou `general.backend` pour en imposer un).
|
||||
|
||||
| Session | Surcouche | Position du pointeur | Clics et touches | Mode focus |
|
||||
|---|---|---|---|---|
|
||||
| **X11** (tout gestionnaire avec composition) | oui | exacte | oui, via XInput2 | oui |
|
||||
| **KDE Plasma, Wayland** | oui | exacte, via un script KWin | demande le groupe `input` | – |
|
||||
| **Hyprland** | oui | exacte, via son socket IPC | demande le groupe `input` | – |
|
||||
| sway, river, niri, labwc, COSMIC… | oui | *estimée* (voir ci-dessous) | demande le groupe `input` | – |
|
||||
| **GNOME, Wayland** | **non** — Mutter n'a pas de layer-shell | – | – | – |
|
||||
| Bureau / session | Statut | Surcouche | Position du pointeur | Clics et touches | Mode focus |
|
||||
|---|---|---|---|---|---|
|
||||
| **KDE Plasma, X11** | testé | oui | exacte | oui, via XInput2 | oui |
|
||||
| **GNOME sous Xorg** (GNOME 48 et antérieurs) | testé sur 48.7 | oui | exacte | oui, via XInput2 | oui |
|
||||
| Autres bureaux X11 avec composition (Xfce, Cinnamon, MATE, i3, openbox…) | non testé, devrait fonctionner | oui | exacte | oui, via XInput2 | oui |
|
||||
| **KDE Plasma, Wayland** | testé sur 6.3.6 | oui | exacte, via un script KWin | demande le groupe `input` | – |
|
||||
| Hyprland | non testé, devrait fonctionner | oui | exacte, via son socket IPC | demande le groupe `input` | – |
|
||||
| sway, river, niri, labwc, COSMIC… | non testé, devrait fonctionner | oui | *estimée* (voir ci-dessous) | demande le groupe `input` | – |
|
||||
| **GNOME, Wayland** (session par défaut de GNOME) | **non pris en charge** | non — Mutter n'a pas de layer-shell | – | – | – |
|
||||
|
||||
Sous GNOME, ouvrez une session **« GNOME sur Xorg »**, ou utilisez un autre bureau. (Une extension GNOME Shell pourrait le faire nativement ; elle n'est pas encore écrite.) Lancer `sourizz --backend x11` dans une session GNOME Wayland (via XWayland) démarre, mais ne contourne pas le problème : le pointeur n'est suivi que lorsqu'il survole une fenêtre X11, et l'anneau reste figé au-dessus des fenêtres Wayland natives (testé sur GNOME 48.7).
|
||||
**La session Wayland par défaut de GNOME n'est pas prise en charge.** Mutter n'a pas de `wlr-layer-shell` : Sourizz ne peut pas y dessiner sa surcouche et s'arrête avec un message explicatif. Lancer `sourizz --backend x11` via XWayland démarre, mais ne contourne pas le problème : le pointeur n'est suivi que lorsqu'il survole une fenêtre X11 (testé sur GNOME 48.7). Sourizz fonctionne bien dans une session **« GNOME sur Xorg »**, mais GNOME 49 et les suivants n'en fournissent plus (Ubuntu 25.10 et Fedora 43 l'ont déjà abandonnée) : sur ces versions, il ne fonctionne donc pas du tout sous GNOME. Une extension GNOME Shell pourrait changer cela ; elle n'est pas encore écrite.
|
||||
|
||||
### Choisir le backend
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ Differences and gaps:
|
||||
|
||||
## Install
|
||||
|
||||
**Works on** KDE Plasma (X11 and Wayland), GNOME on Xorg, and X11 desktops with a compositor; wlroots-based Wayland compositors (Hyprland, sway…) should work but are untested. **Does not work on GNOME's default Wayland session.** Details in the [compatibility table](#x11-and-wayland).
|
||||
|
||||
You need a recent stable [Rust toolchain](https://rustup.rs) (developed with 1.98; the crate uses edition 2024). **No `-dev` packages are required**: the build is pure Rust and loads `libxkbcommon` at run time. The first build takes a few minutes because the settings window pulls in egui; `cargo build --release --no-default-features` builds the daemon alone. If Rust is missing, `./install.sh` offers to install it with rustup (it needs `curl` or `wget` and a C linker such as `build-essential`; add `--yes` to skip the question).
|
||||
|
||||
```sh
|
||||
@@ -142,15 +144,17 @@ spotlight = "Ctrl+Alt+Shift+S"
|
||||
|
||||
Sourizz has one drawing engine and two display backends; it picks the right one automatically (`--backend x11|wayland` or `general.backend` to force one).
|
||||
|
||||
| Session | Overlay | Pointer position | Clicks and keys | Focus mode |
|
||||
|---|---|---|---|---|
|
||||
| **X11** (any compositing WM) | yes | exact | yes, via XInput2 | yes |
|
||||
| **KDE Plasma, Wayland** | yes | exact, via a KWin script | needs the `input` group | – |
|
||||
| **Hyprland** | yes | exact, via its IPC socket | needs the `input` group | – |
|
||||
| sway, river, niri, labwc, COSMIC… | yes | *estimated* (see below) | needs the `input` group | – |
|
||||
| **GNOME, Wayland** | **no** — Mutter has no layer-shell | – | – | – |
|
||||
| Desktop / session | Status | Overlay | Pointer position | Clicks and keys | Focus mode |
|
||||
|---|---|---|---|---|---|
|
||||
| **KDE Plasma, X11** | tested | yes | exact | yes, via XInput2 | yes |
|
||||
| **GNOME on Xorg** (GNOME 48 and earlier) | tested on 48.7 | yes | exact | yes, via XInput2 | yes |
|
||||
| Other X11 desktops with a compositor (Xfce, Cinnamon, MATE, i3, openbox…) | not tested, expected to work | yes | exact | yes, via XInput2 | yes |
|
||||
| **KDE Plasma, Wayland** | tested on 6.3.6 | yes | exact, via a KWin script | needs the `input` group | – |
|
||||
| Hyprland | not tested, expected to work | yes | exact, via its IPC socket | needs the `input` group | – |
|
||||
| sway, river, niri, labwc, COSMIC… | not tested, expected to work | yes | *estimated* (see below) | needs the `input` group | – |
|
||||
| **GNOME, Wayland** (GNOME's default session) | **not supported** | no — Mutter has no layer-shell | – | – | – |
|
||||
|
||||
On GNOME, log in with a **"GNOME on Xorg"** session, or use another desktop. (A GNOME Shell extension could do it natively; that is not written yet.) Running `sourizz --backend x11` inside a GNOME Wayland session (through XWayland) starts, but is not a workaround: the pointer is only tracked while it is over an X11 window, and the ring stays frozen over native Wayland windows (tested on GNOME 48.7).
|
||||
**GNOME's default Wayland session is not supported.** Mutter has no `wlr-layer-shell`, so Sourizz cannot draw its overlay there and stops with an explanatory message. Running `sourizz --backend x11` through XWayland starts but is no workaround: the pointer is only tracked while it is over an X11 window (tested on GNOME 48.7). Sourizz does work in a **"GNOME on Xorg"** session, but GNOME 49 and later no longer ship one (Ubuntu 25.10 and Fedora 43 already dropped it), so on those releases it does not run on GNOME at all. A GNOME Shell extension could change that; it is not written yet.
|
||||
|
||||
### Choosing the backend
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# Handoff: GNOME field test (second part)
|
||||
|
||||
Updated on 2026-10-30 on the field-test machine (`DNIX`, Debian 13, KDE Plasma 6.3.6, Intel UHD 630 + NVIDIA MX250). The user (Denis) writes French: answer in French, keep `README.md` and `README.fr.md` in sync.
|
||||
Claude's per-machine memory does not travel, but the conversation of the previous session is kept per directory: resume it with `claude --continue` (or `claude --resume` to pick it) from `~/src/sourizz`.
|
||||
|
||||
## Where things stand
|
||||
|
||||
- **KDE Plasma Wayland on real hardware: done.** Overlay, ring, trail, click effects, click sounds, keystroke display, spotlight and annotation mode were confirmed by Denis in a real session. Both READMEs say so.
|
||||
- **The "pointer freezes" bug is fixed** (commit `57bea85`): `Devices::rescan` reopened every uninteresting `/dev/input/event*` node every 3 s, and an open costs 25-70 ms on this machine (about 650 ms per rescan). The lesson and the method are in `CLAUDE.md`; `examples/layer_probe.rs` is the bisection tool.
|
||||
- **GNOME 48.7 is installed next to KDE** (`gnome-shell`, `gnome-session`, `gnome-session-xsession`, `gdm3`). SDDM stays the login manager. It lists four GNOME entries: `GNOME on Wayland` and `GNOME on Xorg` are unambiguous; the two plain `GNOME` entries (one from `wayland-sessions`, one from `xsessions`) look identical, so avoid them and pick one of the other two.
|
||||
- Debian 13 still ships the X11 session for GNOME 48. The README sentence "log in with GNOME on Xorg" is therefore right for this release; it would only be wrong from GNOME 49 on (Ubuntu 25.10, Fedora 43).
|
||||
|
||||
## Things to know before testing
|
||||
|
||||
- `~/.config/autostart/sourizz.desktop` exists: **a daemon starts by itself at each login.** Run `pgrep -ax sourizz`, then `sourizz quit`, before every manual test, and do not run two daemons on one session.
|
||||
- The global hotkeys (`Ctrl+Alt+Shift+M`, `S`, `K`, `A`, …) toggle effects in the live daemon. Denis tested them by hand, which changed `enabled`, `spotlight` and `keystrokes` behind our back more than once. If a status looks odd, ask before assuming a bug, and note the md5 of `~/.config/sourizz/config.toml` with each measurement.
|
||||
- Normal state: `enabled=on ring=on trail=on clicks=on sound=on shake=on`, `spotlight=off keystrokes=off focus=off`.
|
||||
- Do not suggest adding the user to the `input` group again: it is already done and `sourizz doctor` reports it.
|
||||
|
||||
## Test plan for the GNOME sessions
|
||||
|
||||
Collect first, in each session, and paste the output back:
|
||||
`echo $XDG_SESSION_TYPE $XDG_CURRENT_DESKTOP; gnome-shell --version; sourizz doctor; wayland-info | grep -i layer`
|
||||
|
||||
1. **GNOME (Wayland session). DONE on 2026-10-30.** The Wayland backend refuses to start with a clear message (exit code 1; the autostart log shows the same). With `sourizz --backend x11` (XWayland) the daemon starts, the ring follows the pointer inside an `xterm` and stays frozen over native Wayland windows, so XWayland is not a workaround. Both READMEs now say so. Not checked: whether the overlay itself is drawn above native Wayland windows.
|
||||
2. **GNOME on Xorg. DONE on 2026-10-30.** `x11_probe` passes 12/12 (isolated default config, pulse off), global hotkeys work, Denis confirmed spotlight, keystrokes, clicks, sound, annotation and the settings window. No tray icon without the AppIndicator extension (not installed, so the claim is consistent; the extension itself was not tried). The default ring hotkey `Ctrl+Alt+Shift+R` collides with GNOME's screen-recording UI and was changed to `O`; Denis's own config file still has `R`.
|
||||
3. If anything differs from the README, fix both READMEs.
|
||||
|
||||
## Open decision: GNOME Wayland support
|
||||
|
||||
Not started, and not to be started without Denis agreeing on a design. Options to discuss once step 1 is done:
|
||||
|
||||
- A GNOME Shell extension (GJS) that draws or feeds the overlay, reads `global.get_pointer()` and registers keybindings, talking to the daemon over its Unix socket (`src/ipc.rs`).
|
||||
- Documenting GNOME Wayland as unsupported, with the X11 session as the only route (valid for GNOME 48; to be revisited for 49 and later).
|
||||
|
||||
Say plainly what each option costs.
|
||||
|
||||
## When done
|
||||
|
||||
Update "What was tested" in both READMEs and the verification lines in `CLAUDE.md`, run `cargo test`, `cargo clippy --all-targets` and `cargo fmt`, then commit and push. Remove this file once its content has been absorbed, and drop the "Pending" line at the top of `CLAUDE.md`.
|
||||
+2
-1
@@ -550,7 +550,8 @@ pub fn run(core: Core, wake: &OwnedFd) -> Result<()> {
|
||||
let layer_shell = LayerShell::bind(&globals, &qh).map_err(|_| {
|
||||
anyhow!(
|
||||
"this compositor does not support wlr-layer-shell, which Sourizz needs to draw its overlay.\n\
|
||||
GNOME (Mutter) is the usual case: log in with a \"GNOME on Xorg\" session, or use KDE Plasma, Hyprland, sway, …"
|
||||
GNOME (Mutter) is the usual case, and its Wayland session is not supported. Log in with a \"GNOME on Xorg\" session if your GNOME \
|
||||
still offers one (GNOME 49 and later do not), or use KDE Plasma, Hyprland, sway, …"
|
||||
)
|
||||
})?;
|
||||
let shm = Shm::bind(&globals, &qh).context("compositor lacks wl_shm")?;
|
||||
|
||||
Reference in New Issue
Block a user