CHAOS /DOCS/WALLPAPER

THE WALLPAPER

The wallpaper (KDE)

A Plasma wallpaper plugin, type CHAOS in your desktop settings. Same renderer as the app, running inside plasmashell's own GL context, paced by a timer at your fps or by the display refresh at 50 and up.

What plays

The seed from its settings page (your vault or a pasted one), else: online and signed in, a random one. Otherwise the first activated seed, else the newest kept one, else the lobby, one fixed public seed, so the desktop is never black.

client/src/wallpaper_seed.cppc++
std::optional<Seed32> pickWallpaperSeed(const std::string& seedArg, bool online, std::string& note) {
    note.clear();
    try {
        if (!seedArg.empty()) {
            Seed32 s;
            try { s = seedFromString(seedArg); } catch (const std::exception& e) { note = std::string("bad seed: ") + e.what(); return std::nullopt; }
            if (!online && !activation::isActivated(s) && !vault::has(s)) { note = "offline: this seed is not in the vault and was never loaded online on this install. keep it, activate it, or reconnect."; return std::nullopt; }
            return s;
        }
        if (online) return randomSeed();
        auto act = activation::load();
        if (!act.empty()) {
            Seed32 s = seedFromHex(act.begin()->first);
            note = "offline: playing an activated chaos " + toShortHex(s);
            return s;
        }
        auto kept = vault::list();                      // newest first
        if (!kept.empty()) {
            Seed32 s; std::memcpy(s.data(), kept.front().file.seed_full, 32);
            note = "offline: playing from the vault " + toShortHex(s);
            return s;
        }
        note = "offline and the vault is empty: roll something in the chaos app, or reconnect.";
        return std::nullopt;
    } catch (const std::exception& e) { note = std::string("seed rule failed: ") + e.what(); return std::nullopt; }
    catch (...) { note = "seed rule failed"; return std::nullopt; }
}

Seed32 lobbySeed() {
    static const char tag[] = "CHAOS-LOBBY-v1";
    blake3_hasher h; blake3_hasher_init(&h);
    blake3_hasher_update(&h, tag, sizeof(tag) - 1);
    Seed32 s; blake3_hasher_finalize(&h, s.data(), 32); return s;
}
client/plasma/chaositem.cpp (in the render thread)c++
            std::string note;
            auto picked = pickWallpaperSeed(m_snap.seed.toStdString(), m_snap.online, note);
            m_fallback = !picked;
            Seed32 seed = picked ? *picked : lobbySeed();                           // never black: the lobby plays instead
            m_renderer.reset(); m_dim.reset();
            m_dim = std::make_unique<Dimension>(rollDimension(seed));
            Mode m; if (!m_snap.mode.isEmpty() && parseMode(m_snap.mode.toStdString(), m)) m_dim->setDisplayMode(m);
            if (m_snap.modelOn && !m_snap.model.isEmpty()) {
                if (auto mm = model::readCheng(m_snap.model.toStdString())) {
                    float rgb[3] = { 0.9f, 0.93f, 0.91f }; parseHexColor(m_snap.modelColor.toStdString(), rgb);
                    applyModel(*m_dim, std::move(*mm), modelSkinIndex(m_snap.modelSkin.toStdString(), unsigned(now)), glm::vec3(rgb[0], rgb[1], rgb[2]));
                } else if (!m_snap.preview) tell("model file not readable: " + m_snap.model + " (showing the seed's shape)");

The settings page

Which chaosThe vault picker (claimed first, then rolled, then previews), or paste a seed.
How it's drawnMode. Draw: everything, no satellites, main shape alone.
CostFps, render size (3/4 by default), anti-aliasing (off by default), lite detail, pause on battery, pause under a fullscreen window and slow under a maximized one (off by default).
Your own modelA .cheng, skin, color. See .cheng.
RegistryWhere it asks if it may roll.
StatusThe last line the wallpaper reported, live.

The log

Everything it reports goes to ~/.cache/chaos/plasma.log: what it shows, why it fell back, registry state, pauses, render errors. So a black desktop is never silent.

The mark

The icon is 16x16 cells, order on the left falling apart to the right. One bitmap drawn everywhere.

client/src/ui/mark.hc++
"................",
    "................",
    ".#######..##....",
    ".#####...##.....",
    ".#######.#......",
    ".#######.##..#..",
    ".#######.#......",
    ".##########.....",
    ".######.#.#.....",
    ".#####.###...#..",
    ".######..##.....",
    ".######..###.#..",
    ".#######..#.##..",
    ".#######...#....",
    "................",
    "................",