feat: take the last of sway out of the classroom

The DVD player was the only thing still speaking a compositor the room
no longer runs. It asked sway's tree whether VLC's window had really
gone fullscreen, because VLC reports playing while its window is still
the black startup one the loading cover exists to hide.

VLC's own status was measured as a replacement and is not one: it
reports fullscreen true in the same 250ms poll as playing, because the
flag is the option it was started with and not a report about its
window. So the cover is held for a floor and capped by the deadline that
was already there, and the compositor is not asked anything.

Focus-or-launch went the same way. The session already takes an
exclusive lock, so a second one cannot start, and bringing an existing
one to the front is the panel's job.

classroom-window, classroom_sway and classroom_chrome are gone with it —
the last of them was reachable from nothing at all.

DVD also moves out of the status row, where it sat beside the clock as
though a disc were a machine reading. It is an application: it is in the
row with Wonder Ink and the browser, and classroom-provision removes it
from the layout on a machine with no optical drive, which retires
DVD_ENABLED. A computer that moves between rooms takes its drive with
it; nobody remembers to edit a file when it does.

The panel is rebuilt from the package at every login now. Plasma keeps
whatever panel it first built, so an update could change the bar in the
package and never change it in a room — measured, with an icon that
outlived the file it came from. Editing the live panel configuration was
tried instead and destroyed the panel, because the shell owns that file.
Removing it before the shell starts is safe and makes the desktop
stateless.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-10 13:00:50 -05:00
co-authored by Claude Opus 5
parent 18cf0249dd
commit d2d30d6b0c
25 changed files with 402 additions and 737 deletions
+6 -30
View File
@@ -7,7 +7,7 @@ PYTHONPATH="$ROOT/lib" python3 - <<'PY'
import tempfile
from pathlib import Path
from classroom_config import dock_items, ensure_device_config, read_device_config
from classroom_config import ensure_device_config, read_device_config
passed = failed = 0
@@ -24,40 +24,18 @@ def check(label, condition, detail=""):
failed += 1
print("1. dock capabilities")
cases = [
({}, ("browser",)),
({"DVD_ENABLED": "true"}, ("browser", "dvd")),
({"LIVE_ENABLED": "true"}, ("browser", "live")),
(
{"DVD_ENABLED": "true", "LIVE_ENABLED": "true"},
("browser", "dvd", "live"),
),
]
print("1. the room no longer keeps a list of dock buttons")
check("dock_items is gone with the dock it described",
not hasattr(__import__("classroom_config"), "dock_items"))
check("and DVD_ENABLED with it, because the machine can be asked",
"DVD_ENABLED" not in __import__("classroom_config").DEVICE_CONFIG_TEMPLATE)
for config, expected in cases:
actual = dock_items(config)
check(f"{config or 'both disabled'} -> {expected}", actual == expected, actual)
check(
"false spellings do not leave placeholder items",
dock_items({"DVD_ENABLED": "false", "LIVE_ENABLED": "off"}) == ("browser",),
)
check(
"existing dock order is browser, DVD, LIVE",
dock_items({"DVD_ENABLED": "yes", "LIVE_ENABLED": "1"})
== ("browser", "dvd", "live"),
)
print()
print("2. fresh device configuration")
with tempfile.TemporaryDirectory() as directory:
path = Path(directory) / "etc" / "device.conf"
ensure_device_config(path)
config = read_device_config(path)
check("fresh config is created", path.is_file())
check("DVD defaults off", config.get("DVD_ENABLED") == "false")
check("LIVE defaults off", config.get("LIVE_ENABLED") == "false")
check("MQTT defaults off", config.get("MQTT_ENABLED") == "false")
check("stable remains the fresh-install default", config.get("CHANNEL") == "stable")
@@ -86,8 +64,6 @@ with tempfile.TemporaryDirectory() as directory:
check("old bytes remain at the start", first.startswith(old))
check("channel survives", config.get("CHANNEL") == "canary")
check("DVD choice survives", config.get("DVD_ENABLED") == "true")
check("UI scale survives", config.get("UI_SCALE") == "1.25")
check("MQTT host survives", config.get("MQTT_HOST") == "broker.example.test")
check("MQTT password survives", config.get("MQTT_PASSWORD") == "secret")
check("unknown settings survive", config.get("CUSTOM_SETTING") == "keep-me")