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:
mxandClaude Opus 5.5 committed 2026-11-12 17:18:58 +01:00
1 parent 73de4b06a8
commit e4ca1f5d9c
12 files changed
+98 -14

No files matched your search

+13 -8
View File
@@ -19,21 +19,26 @@ Singleton {
error = "This desktop entry is no longer installed.";
return false;
}
let command = action ? action.command : entry.command;
if (entry.runInTerminal) {
const terminal = ConfigService.data.dock.terminalCommand;
if (!terminal.length) {
error = "Set dock.terminalCommand to a terminal command argument array before launching terminal applications.";
return false;
}
Quickshell.execDetached({
command: terminal.concat(action ? action.command : entry.command),
workingDirectory: entry.workingDirectory
});
} else if (action)
action.execute();
else
entry.execute();
command = terminal.concat(command);
}
Quickshell.execDetached({
command: scoped(command),
workingDirectory: entry.workingDirectory
});
error = "";
return true;
}
// Run the app in its own transient systemd scope. Launched directly, it would
// join the shell's cgroup and be killed whenever the shell service restarts.
// Falls back to a plain launch where systemd-run is unavailable.
function scoped(command) {
return ["sh", "-c", 'if command -v systemd-run >/dev/null 2>&1; then exec systemd-run --user --scope --collect --quiet -- "$@"; fi; exec "$@"', "sh"].concat(command);
}
}
+1
View File
@@ -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");
+6 -1
View File
@@ -238,8 +238,9 @@ Singleton {
if (activePopout && activePopout !== owner && typeof activePopout.close === "function")
activePopout.close();
activePopout = owner;
// The notch stays open: its strip hosts plugin widgets whose panels
// open from it. It hands keyboard focus over while one is open.
ShellState.controlCenterOpen = false;
ShellState.notchOpen = false;
ShellState.dashboardOpen = false;
PopoutState.close();
TrayService.close();
@@ -413,6 +414,10 @@ Singleton {
if (ShellState.launcherOpen)
root.closePopout();
}
function onNotchOpenChanged() {
if (!ShellState.notchOpen)
root.closePopout();
}
function onSettingsOpenChanged() {
if (ShellState.settingsOpen)
root.closePopout();