A pane can't hold a GUI app
The workaround is streaming pixels through terminal escape sequences — which needs a capable host terminal and costs a readback every frame.
A Linux distribution proposal · prototype stage
shefros proposes an Arch-based Linux distribution whose desktop session is shefrd: every Super key a shefrd action, every window a pane. A pane could hold a terminal, a browser or a game. Today, the part that exists is the proof underneath it — pinning a real GUI window into a pane, and checking it's actually drawn there.
$ npm run dev ready on http://localhost:4321 GET / 200 4ms GET /styles.css 200 1ms GET / 200 3ms
$ shefros-pin $SOCK w1:p2 8 --once
w1:p2 -> 619,14 661x226 got 619,14 661x226 match=True inside_host=True
An illustration of the idea: shefrd owns the layout, and a browser window sits in pane w1:p2 like any terminal would. The pinned-window output is the real line recorded in the prototype's verification.
Why
shefrd dissolved the limits of being a guest inside someone else's terminal. The ones that remain come from being a guest inside someone else's window manager.
The workaround is streaming pixels through terminal escape sequences — which needs a capable host terminal and costs a readback every frame.
shefrd can parse, decode, match and map Super from two keyboard protocols. The path has never been fed once, because the window manager takes the key first.
shefrd's spaces and the desktop's workspaces compete for the same word and the same keys. In shefros there would be one.
What exists today
Small Python programs, each honest about what it can and can't establish.
Holds a window at a shefrd pane's rect. shefrd owns the layout; the compositor only places what it's told. Placement is confirmed against the client's own window rect, not the compositor's intent.
shefros-pin <shefrd-api-socket> <pane-id> <sway-con-id> [--once]
Geometry isn't visibility: an occluded window reports a perfect rect. So it hides the window and looks again — if the pixels don't change, nothing of it was on screen.
shefros-visible <con-id> <x> <y> <w> <h>
Drives shefrd through its public CLI in a throwaway session: two spaces, split panes running commands, three demo agents reporting their state — and one of them really fixes a failing test. Then it deletes everything it made, by name.
shefros-demo [--show] [--pace SECONDS] [--hold SECONDS] [--report FILE]
--showMeasured, not assumed
A browser once sat invisible behind the terminal while every geometry check said it was placed correctly. The visibility check tells the three cases apart:
| Case | Result |
|---|---|
| Pinned and raised | visible=True · delta 213.6 |
| Occluded by the host window | visible=False · delta 0.0 |
| Parked in the scratchpad | inconclusive · window is in the scratchpad |
$ shefros-pin $SOCK w1:p2 8 --once && \ shefros-visible 8 619 14 661 226 w1:p2 -> 619,14 661x226 got 619,14 661x226 match=True inside_host=True visible=True mean_pixel_delta=213.6 threshold=8.0
Recorded in the prototype's verification, nested sway 1.7 on WSLg at 1280×720. Raise the host window over the pinned one and geometry still says match=True — but the pixel delta collapses to 0.0 and the verdict flips.
Status
shefros isn't an installable distribution or a desktop session yet. Nothing here should be read as one.
# needs sway, grim, python3 with Pillow, and a running shefrd bin/shefros-pin "$SHEFRD_SOCKET" w1:p2 <sway-con-id> --once bin/shefros-visible <sway-con-id> <x> <y> <w> <h> bin/shefros-demo --show # needs only shefrd and python3
Set SHEFROS_WAYLAND_DISPLAY when the compositor under test isn't the one your shell is connected to. Continuous pinning installs a broad window rule: use it only in an isolated test compositor.