Add bar spots beside the notch, and Caffeine and Night Light modules

Notch mode gets two more module lists, notch.innerLeft and
notch.innerRight: spots right beside the notch at the same distance on
both sides. They follow the notch's edges as it springs wider for media,
never draw pills (plugins and the tray drop theirs there), and fade out
while the notch is open or widened. Picking a module for one of the four
side spots in Settings -> Notch moves it there from the others.

Caffeine and Night Light are now bar modules too; Night Light polls its
state every 30 s while only the bar watches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-29 23:27:01 +01:00
1 parent 3f0e31b116
commit bc197339fa
12 files changed
+169 -13

No files matched your search

+27 -4
View File
@@ -10,15 +10,26 @@ import "../../theme"
SettingsPage {
id: root
readonly property var options: ConfigService.data.notch
// The four spots in the bar row; a module sits in one of them at a time.
readonly property var sideKeys: ["left", "innerLeft", "innerRight", "right"]
// Adds or removes a bar module from one of the notch's module lists.
// Adding it to a side spot moves it there from the other side spots.
function toggleModule(key, id) {
const list = (options[key] || []).slice();
const at = list.indexOf(id);
if (at >= 0)
if (at >= 0) {
list.splice(at, 1);
else
list.push(id);
ConfigService.setValue("notch." + key, list);
return ConfigService.setValue("notch." + key, list);
}
list.push(id);
const next = Object.assign({}, options, {
[key]: list
});
if (sideKeys.includes(key))
for (const other of sideKeys)
if (other !== key)
next[other] = (options[other] || []).filter(m => m !== id);
ConfigService.setValue("notch", next);
}
// Chips for every bar module; filled ones are shown there, in click order.
component ModulePicker: SettingRow {
@@ -104,6 +115,18 @@ SettingsPage {
icon: "󰁔"
key: "right"
}
ModulePicker {
title: "Left of the notch"
description: "Right beside the notch, always without a pill"
icon: "󰁍"
key: "innerLeft"
}
ModulePicker {
title: "Right of the notch"
description: "Right beside the notch, always without a pill"
icon: "󰁔"
key: "innerRight"
}
PreferenceChoice {
label: "Workspace style"
description: "\"bar\" uses the style from Settings → Bar"