app
Adom Screensaver
Public Made by Adomby adom
Vibe-coding screensaver, fades up a live billboard of the latest Adom Wiki drops (truly cached to disk; plays webm silently, renders SVG) with a power-aware nerd-stats splash, while signed native keep
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
<!doctype html>
<!-- Adom Screensaver, Status / diagnostics. Rendered windowed in a WebView2 by adom-screensaver.scr
/status. The data comes from status.json, written by the ELEVATED adom-stayawake.exe helper (it
runs `powercfg /requests`, admin-only, to see exactly what's holding the display awake). The .scr
just injects it via window.adomStatus(data). -->
<html lang="en">
<head>
<meta charset="utf-8">
<style>
:root { --teal:#00b8b0; --tealbri:#00e6dc; --hi:#e6edf3; --lo:#8b949e; --dim:#6b7280;
--bg:#0d1117; --panel:#161b22; --line:#21262d; --warn:#e3a008; --ok:#2ea043; }
* { margin:0; padding:0; box-sizing:border-box; }
html,body { background:var(--bg); color:var(--hi); font-family:"Segoe UI",system-ui,sans-serif; user-select:none; }
body { padding:26px 30px; overflow-y:auto; }
.head { display:flex; align-items:center; gap:14px; }
.head img { height:30px; }
.head .t { font-size:17px; font-weight:600; letter-spacing:.02em; }
.head .t small { display:block; color:var(--teal); font-size:11px; letter-spacing:.42em;
text-transform:uppercase; font-weight:600; margin-top:2px; }
.why { margin-top:18px; background:var(--panel); border:1px solid var(--line);
border-left:3px solid var(--teal); border-radius:8px; padding:14px 17px; }
.why p { font-size:12.5px; line-height:1.55; color:var(--lo); }
.why b { color:var(--hi); font-weight:600; }
.card { margin-top:14px; background:var(--panel); border:1px solid var(--line); border-radius:10px;
padding:15px 18px; border-left:3px solid var(--line); }
.card.ok { border-left-color:var(--ok); }
.card.warn { border-left-color:var(--warn); }
.card .lbl { font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:var(--dim);
font-weight:600; }
.card .big { margin-top:7px; font-size:14.5px; font-weight:600; color:var(--hi); }
.card .big.ok { color:#5dd879; }
.card .big.warn { color:#f0c548; }
.card .sub { margin-top:7px; font-size:12.5px; line-height:1.55; color:var(--lo); }
.card .sub b { color:var(--hi); font-weight:600; }
.card .sub .code { color:var(--tealbri); font-weight:600; font-family:"Cascadia Code","Consolas",monospace; font-size:.94em; }
.rowhead { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.live { display:inline-flex; align-items:center; gap:8px; font-size:10px; color:var(--dim);
letter-spacing:.1em; text-transform:uppercase; font-weight:600; white-space:nowrap; }
.livedot { width:7px; height:7px; border-radius:50%; background:var(--teal); flex:none;
box-shadow:0 0 7px rgba(0,184,176,.7); animation:lp 1.8s ease-in-out infinite; }
@keyframes lp { 0%,100%{opacity:.35} 50%{opacity:1} }
.live button { background:transparent; border:1px solid var(--line); color:var(--lo); flex:none;
border-radius:7px; width:26px; height:26px; font-size:15px; line-height:1; cursor:pointer; padding:0; }
.live button:hover { border-color:var(--teal); color:var(--tealbri); }
.live button.spin { animation:spin .55s ease; }
@keyframes spin { to { transform:rotate(360deg); } }
.holders { margin-top:10px; display:flex; flex-direction:column; gap:7px; }
.holder { display:flex; align-items:center; gap:10px; padding:9px 12px; border:1px solid var(--line);
border-radius:8px; background:#0f141b; font-size:12.5px; }
.holder .dot { width:8px; height:8px; border-radius:50%; flex:none; }
.holder .dot.warn { background:var(--warn); box-shadow:0 0 7px rgba(227,160,8,.6); }
.holder .dot.ok { background:var(--teal); }
.holder .name { font-weight:600; color:var(--hi); }
.holder .reason { color:var(--lo); }
.holder .me { margin-left:auto; font-size:11px; color:var(--dim); }
.foot { margin-top:16px; color:var(--dim); font-size:11px; line-height:1.5; }
.actions { margin-top:16px; }
button { font-family:inherit; font-size:13px; font-weight:600; border-radius:8px; cursor:pointer;
padding:9px 18px; border:1px solid var(--line); background:var(--panel); color:var(--hi); }
button:hover { border-color:var(--teal); }
.scbtn { font-family:inherit; display:inline-block; margin-top:8px; font-size:11.5px; font-weight:600;
padding:5px 11px; border-radius:7px; border:1px solid var(--line); background:#0f141b; color:var(--tealbri); cursor:pointer; }
.scbtn:hover { border-color:var(--teal); }
.scitem { display:flex; flex-direction:column; gap:3px; align-items:stretch; }
.scitem .toprow { display:flex; align-items:center; gap:10px; width:100%; }
.scitem .badge { margin-left:auto; font-weight:600; font-size:12px; white-space:nowrap; }
.scitem .note { margin-left:18px; color:var(--lo); line-height:1.5; }
.b-ok { color:#5dd879; } .b-warn { color:#f0c548; } .b-dim { color:var(--dim); }
</style>
</head>
<body>
<div class="head">
<img src="adom-wordmark.png" alt="Adom">
<div class="t">Screensaver<small>Status & screen locks</small></div>
</div>
<div class="why">
<p>A small background helper, <b>adom-stayawake.exe</b>, runs all the time. It does three things:
it <b>keeps your PC awake</b> so long-running AI sessions (Claude / Hydrogen Desktop) don't die when
you step away, it launches the <b>Adom Wiki billboard</b> as your screensaver, and it <b>watches
whether anything is stopping your display from turning off</b>. It runs with admin rights so it can
see exactly what's holding your display on, and that's what this screen shows.</p>
</div>
<div id="keepawake" class="card">
<div class="lbl">Keep-awake</div>
<div class="big" id="ka-big">…</div>
<div class="sub" id="ka-sub"></div>
</div>
<div id="displaylock" class="card">
<div class="rowhead">
<div class="lbl">Can your display turn off right now?</div>
<div class="live"><span class="livedot"></span><span class="livetxt">live · auto every 10s</span><button id="refresh" title="Check again now">↻</button></div>
</div>
<div class="big" id="dl-big">…</div>
<div class="sub" id="dl-sub"></div>
<div class="holders" id="dl-holders"></div>
</div>
<div id="systemlock" class="card">
<div class="lbl">What's keeping the machine awake</div>
<div class="sub" id="sys-sub"></div>
<div class="holders" id="sys-holders"></div>
</div>
<div id="syschanges" class="card">
<div class="rowhead">
<div class="lbl">System & power changes by Adom Screensaver</div>
<div class="live" id="sc-scheme"></div>
</div>
<div class="sub" style="margin-top:6px">To give you <b>display off but the machine still running</b> on this
laptop, the screensaver changed a few Windows power settings. Here's exactly what it touched, shown live so
you always know what's been done to your hardware:</div>
<div class="holders" id="sc-list" style="margin-top:12px"></div>
<div class="foot" id="sc-foot" style="margin-top:13px"></div>
<div id="sc-actions" style="margin-top:10px"></div>
</div>
<div class="foot">This re-checks <b>live</b> every 10 seconds while it's open (or hit <b>↻</b>). The
display lock above is the only thing that can stop the screensaver from starting or the display from
turning off. The machine keep-awake does not.</div>
<div class="actions"><button id="close">Close</button></div>
<div style="height:30px"></div>
<script>
function send(m){ try{ if(window.chrome && window.chrome.webview){ window.chrome.webview.postMessage(m); } }catch(e){} }
function esc(s){ return (s==null?"":String(s)).replace(/&/g,"&").replace(/</g,"<"); }
function holderRow(text, warn){
var i = text.indexOf(" · ");
var name = i>=0 ? text.slice(0,i) : text;
var reason = i>=0 ? text.slice(i+3) : "";
return '<div class="holder"><span class="dot '+(warn?"warn":"ok")+'"></span>' +
'<span class="name">'+esc(name)+'</span>' + (reason?'<span class="reason">· '+esc(reason)+'</span>':'') + '</div>';
}
// Called by the .scr host with the helper's status.json.
window.adomStatus = function(d){
if(!d) return;
// keep-awake
var ac = d.keepAwake === "ac";
document.getElementById("ka-big").textContent = ac ? "On, your PC won't sleep" : "Passive, on battery";
document.getElementById("ka-sub").innerHTML = ac
? "You're plugged in, so the helper holds the machine awake so your AI sessions keep running and the network stays up while you step away. (Your <b>display</b> still turns off on schedule; keep-awake only stops the machine sleeping.)"
: "On battery the helper stays passive, so Windows sleeps on its normal schedule (your battery isn't drained flat while you're away). Plug in to keep sessions running indefinitely.";
// display lock, the one that can block the screensaver
var dl = (d.display||[]);
var card = document.getElementById("displaylock");
var big = document.getElementById("dl-big");
var sub = document.getElementById("dl-sub");
var hold = document.getElementById("dl-holders");
if (dl.length === 0){
card.className = "card ok"; big.className = "big ok";
big.textContent = "✓ Yes, nothing is holding your display on";
sub.innerHTML = "Nothing is forcing your display to stay on, so the screensaver will start after about <b>"+(d.saverMin||2)+" min</b> idle, then the display <b>physically turns off</b> so the panel can't burn in." +
"<br><br>Apps can land here when they're active: a <b>screen-share or video call</b>, a <b>screen recording</b>, an <b>Adom screenshot/sharing session</b>, or a <b>video playing fullscreen</b>. That's normal while they run, but if one is ever left on it'll quietly keep your display from turning off all night. Whenever your display won't turn off, open this screen and it names exactly which app to stop.";
hold.innerHTML = "";
} else {
card.className = "card warn"; big.className = "big warn";
big.textContent = "⚠ No, an app is holding your display on";
sub.innerHTML = "While these are running, Windows <b>won't start the screensaver and won't turn the display off</b>. Stop the screen capture to fix it. For an Adom screen-share, run <span class='code'>adom-cli hydrogen sharing stop</span>." +
(d.elevated===false ? " <i>(The helper isn't elevated, so it can't name the app. It should be running as admin.)</i>" : "");
hold.innerHTML = dl.map(function(h){ return holderRow(h, true); }).join("");
}
// system lock, the machine keep-awake (informational; the helper itself)
var sys = (d.system||[]);
document.getElementById("sys-sub").innerHTML = sys.length === 0
? "Nothing is holding the machine awake right now."
: "These hold the <b>machine</b> awake (not the display). This is normal: <b>"+esc(d.helperExe||"adom-stayawake.exe")+"</b> is this helper, keeping your PC awake on purpose. It does <b>not</b> stop the display from turning off.";
document.getElementById("sys-holders").innerHTML = sys.map(function(h){
var me = h.indexOf(d.helperExe||"adom-stayawake")>=0;
return holderRow(h, false).replace('</div>', (me?'<span class="me">that\'s this helper</span>':'')+'</div>');
}).join("");
// system & power changes the screensaver made (transparency: show what we did to the hardware, live)
var sc = (d.systemChanges||[]);
var scl = document.getElementById("sc-list");
var anyReverted = false, anyPending = false;
if (scl){
scl.innerHTML = sc.map(function(c){
if(c.state==="reverted") anyReverted = true;
if(c.state==="pending") anyPending = true;
var bcls = c.state==="active" ? "b-ok" : (c.state==="reverted"||c.state==="pending" ? "b-warn" : "b-dim");
var dotcls = c.state==="active" ? "ok" : (c.state==="reverted"||c.state==="pending" ? "warn" : "ok");
var icon = c.state==="active" ? "✓ " : (c.state==="pending" ? "⏳ " : (c.state==="reverted" ? "⚠ " : ""));
var btn = "";
if (c.reapply) btn += '<button class="scbtn" data-act="sysreapply">Re-apply</button>';
if (c.key==="lid") btn += '<button class="scbtn" data-act="openlid">Open Windows lid settings</button>';
return '<div class="holder scitem">' +
'<div class="toprow"><span class="dot '+dotcls+'"></span>' +
'<span class="name">'+esc(c.label)+'</span>' +
'<span class="badge '+bcls+'">'+icon+esc(c.now)+'</span></div>' +
'<div class="note">'+esc(c.note)+(btn?'<br>'+btn:'')+'</div>' +
'</div>';
}).join("");
}
var scheme = document.getElementById("sc-scheme");
if (scheme) scheme.innerHTML = d.activeScheme ? ('<span class="livedot"></span>power plan: <b style="color:var(--hi)">'+esc(d.activeScheme)+'</b>') : '';
var scf = document.getElementById("sc-foot");
if (scf) scf.innerHTML =
(anyPending ? "<b class='b-warn'>Restart needed</b> to finish applying the Modern Standby change. " : "") +
(anyReverted ? "<b class='b-warn'>Something outside Adom changed a setting back</b> (usually an Armoury Crate / vendor power-profile switch). Re-apply above to restore it. " : "") +
"These are the only system settings the screensaver touches. <b>Undo</b> returns them to Windows defaults (re-enables Modern Standby and a 30-minute sleep on AC); a restart finishes it.";
var sca = document.getElementById("sc-actions");
if (sca){
sca.innerHTML = '<button id="sc-undo">Undo all Adom power changes</button>';
document.getElementById("sc-undo").onclick = function(){ send("sysundo"); };
Array.prototype.forEach.call(document.querySelectorAll("#sc-list .scbtn"), function(b){
b.onclick = function(){ send(b.getAttribute("data-act")); };
});
}
// flash the live indicator so each refresh (manual or the 10s auto) is visibly an update
var lt = document.querySelector(".livetxt");
if (lt){ lt.textContent = "updated just now"; clearTimeout(window._ltT); window._ltT = setTimeout(function(){ lt.textContent = "live · auto every 10s"; }, 1700); }
};
document.getElementById("close").addEventListener("click", function(){ send("close"); });
var rb = document.getElementById("refresh");
if (rb) rb.addEventListener("click", function(){ send("refresh"); this.classList.remove("spin"); void this.offsetWidth; this.classList.add("spin"); });
setInterval(function(){ send("refresh"); }, 10000); // live: re-check powercfg every 10s while open
</script>
</body>
</html>