Add notch opacity and colour; open plugin panels from the notch strip
- Settings → Notch → Look: opacity (0% glass to 100% solid) and colour for the notch, the open notch and the notch-mode launcher. - Bar popouts and plugin panels add the open notch's screen offset, so tooltips and panels from the strip land under their module. - Opening a plugin panel keeps the notch open; the notch hands keyboard focus to the panel and takes it back when it closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
73de4b06a8
commit
e4ca1f5d9c
12 files changed
+98
-14
No files matched your search
@@ -87,6 +87,7 @@ function validate(c) {
|
||||
if(!c.notch || ["enabled","mediaFirst"].some(k=>typeof c.notch[k]!=="boolean"))throw Error("Invalid notch preferences");
|
||||
for(const key of ["left","right","strip"]) if(!Array.isArray(c.notch[key]) || c.notch[key].some(id=>typeof id!=="string" || !id))throw Error("Invalid notch modules");
|
||||
if(!Array.isArray(c.notch.controls) || c.notch.controls.some(m=>!m || typeof m.id!=="string" || typeof m.enabled!=="boolean" || ["w","h"].some(k=>m[k]!==undefined && (!Number.isInteger(m[k]) || m[k]<1 || m[k]>4)) || [["x",3],["y",63]].some(([k,max])=>m[k]!==undefined && (!Number.isInteger(m[k]) || m[k]<0 || m[k]>max))))throw Error("Invalid notch controls");
|
||||
if(!Number.isFinite(c.notch.opacity) || c.notch.opacity<0 || c.notch.opacity>100 || typeof c.notch.color!=="string" || (c.notch.color!=="" && !/^#[0-9a-fA-F]{6}$/.test(c.notch.color)))throw Error("Invalid notch colour");
|
||||
if(typeof c.osd.enabled!=="boolean" || !["slide","drop","fade","shrink"].includes(c.osd.animation) || !["top-right","top-center","bottom-center"].includes(c.osd.position) || !Number.isInteger(c.osd.timeout) || c.osd.timeout<500 || c.osd.timeout>5000 || !Number.isInteger(c.osd.step) || c.osd.step<1 || c.osd.step>20)throw Error("Invalid OSD preferences");
|
||||
const notes=c.notifications;
|
||||
if(!notes || ["enabled","doNotDisturb","criticalInDnd"].some(k=>typeof notes[k]!=="boolean") || !["slide","drop","fade","shrink"].includes(notes.animation) || !["top-right","top-center"].includes(notes.position) || !Number.isInteger(notes.timeout) || notes.timeout<1000 || notes.timeout>30000 || !Number.isInteger(notes.maxPopups) || notes.maxPopups<1 || notes.maxPopups>6)throw Error("Invalid notification preferences");
|
||||
|
||||
Reference in new issue
Block a user