Add a notch island style and tidy the Notch settings page

Islands can float (as before), sit on rounded pills or hang from the top
edge like the notch, both in the notch colour. The Notch page now runs
Notch, Islands, Open notch, Colour, Animation, and the colour change
speed only shows when it does something (glassy when open).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-14 17:25:04 +01:00
1 parent 049ce180da
commit a0de1d2c41
4 files changed
+145 -120

No files matched your search

+40 -23
View File
@@ -106,34 +106,51 @@ PanelWindow {
} }
} }
// Notch mode ------------------------------------------------------------- // Notch mode -------------------------------------------------------------
GlassPanel { // Side islands: "float" leaves the modules on the wallpaper, "pill" puts
id: leftIsland // them on rounded pills and "notch" hangs them from the top edge like the
// No bar behind the modules in notch mode: they float on their own. // centre notch. Both use the notch's fill.
color: Theme.transparent readonly property string islandStyle: ConfigService.ready ? ConfigService.data.notch.islandStyle : "float"
border.width: 0 component Island: GlassPanel {
id: island
property alias row: islandRow
property string side
readonly property bool hanging: root.islandStyle === "notch"
color: root.islandStyle === "pill" ? Theme.notchFill : Theme.transparent
border.width: root.islandStyle === "pill" ? 1 : 0
plain: true plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.left.length > 0 visible: root.notch && ConfigService.ready && ConfigService.data.notch[side].length > 0
x: root.outerMargin // Hanging islands keep their ears on screen.
y: root.islandY x: {
width: leftRow.implicitWidth + 12 const inset = root.outerMargin + (hanging ? BarDrawers.ear : 0);
height: BarDrawers.height return side === "left" ? inset : root.width - inset - width;
radius: BarDrawers.radius
ModuleRow { id: leftRow; position: "left"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "left"); barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
} }
GlassPanel {
id: rightIsland
// No bar behind the modules in notch mode: they float on their own.
color: Theme.transparent
border.width: 0
plain: true
visible: root.notch && ConfigService.ready && ConfigService.data.notch.right.length > 0
x: root.width - root.outerMargin - width
y: root.islandY y: root.islandY
width: rightRow.implicitWidth + 12 width: islandRow.implicitWidth + (root.islandStyle === "float" ? 12 : 24)
height: BarDrawers.height height: BarDrawers.height
radius: BarDrawers.radius radius: root.islandStyle === "pill" ? height / 2 : BarDrawers.radius
ModuleRow { id: rightRow; position: "right"; active: root.notch; modules: BarLayout.notchModules(root.screen ? root.screen.name : "", "right"); barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter } DrawerShape {
z: -1
visible: island.hanging
x: -BarDrawers.ear
y: -island.y
bodyWidth: island.width
bodyHeight: BarDrawers.bottom
ear: BarDrawers.ear
radius: Math.min(Theme.radius, BarDrawers.bottom / 2)
fillColor: Theme.notchFill
} }
ModuleRow {
id: islandRow
position: island.side
active: root.notch
modules: BarLayout.notchModules(root.screen ? root.screen.name : "", island.side)
barScreen: root.screen
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Island { id: leftIsland; side: "left" }
Island { id: rightIsland; side: "right" }
NotchPill { NotchPill {
id: notchPill id: notchPill
barScreen: root.screen barScreen: root.screen
+2 -1
View File
@@ -276,7 +276,8 @@
"openSpeed": 100, "openSpeed": 100,
"closeSpeed": 100, "closeSpeed": 100,
"colorSpeed": 100, "colorSpeed": 100,
"workspaceStyle": "bar" "workspaceStyle": "bar",
"islandStyle": "float"
}, },
"dashboard": { "dashboard": {
"enabled": true, "enabled": true,
+1
View File
@@ -90,6 +90,7 @@ function validate(c) {
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(!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.notch.glassOnOpen!=="boolean" || typeof c.notch.launcherMatch!=="boolean" || ["openSpeed","closeSpeed","colorSpeed"].some(k=>!Number.isFinite(c.notch[k]) || c.notch[k]<25 || c.notch[k]>300))throw Error("Invalid notch animation"); if(typeof c.notch.glassOnOpen!=="boolean" || typeof c.notch.launcherMatch!=="boolean" || ["openSpeed","closeSpeed","colorSpeed"].some(k=>!Number.isFinite(c.notch[k]) || c.notch[k]<25 || c.notch[k]>300))throw Error("Invalid notch animation");
if(!["bar","numbers","roman","kanji","dots","pacman"].includes(c.notch.workspaceStyle))throw Error("Invalid notch workspace style"); if(!["bar","numbers","roman","kanji","dots","pacman"].includes(c.notch.workspaceStyle))throw Error("Invalid notch workspace style");
if(!["float","pill","notch"].includes(c.notch.islandStyle))throw Error("Invalid notch island style");
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"); 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; 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"); 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");
+102 -96
View File
@@ -64,70 +64,75 @@ SettingsPage {
} }
SettingsSection { SettingsSection {
title: "Notch" title: "Notch"
description: "Splits the bar into side islands with a notch at the top centre. Super+C, Super+X and a click on the notch open it: dashboard pages on the left (scroll to switch), controls and weather in the middle, notifications on the right. The launcher drops out of it." description: "Splits the bar into side islands with a notch at the top centre. Super+N switches between notch mode and the full bar."
PreferenceToggle { PreferenceToggle {
label: "Notch" label: "Notch mode"
description: root.options.enabled ? "On: notch mode" : "Off: the full bar" description: root.options.enabled ? "On: islands and a notch" : "Off: the full bar"
icon: "󰹑" icon: "󰹑"
setting: "notch.enabled" setting: "notch.enabled"
} }
SettingRow {
title: "Preview"
description: "Super+C, Super+X or a click on the notch open it too"
icon: "󰈈"
GlassButton {
objectName: "notchOpenButton"
text: "Open notch"
enabled: root.options.enabled
onClicked: ShellState.openNotch()
}
}
} }
SettingsSection { SettingsSection {
title: "Look" title: "Islands"
description: "0% is the normal glass. Raise the opacity towards a solid colour: e.g. 50% with a purple colour, or 100% black for OLED." description: "The bar modules either side of the notch."
enabled: root.options.enabled enabled: root.options.enabled
PreferenceSlider { PreferenceChoice {
label: "Notch opacity" label: "Island style"
icon: "󰃟" description: "float: modules on the wallpaper; pill: rounded pills; notch: hung from the top edge like the notch. Pill and notch use the notch colour."
setting: "notch.opacity" icon: "󰕰"
from: 0 setting: "notch.islandStyle"
to: 100 choices: ["float", "pill", "notch"]
step: 1
unit: "%"
} }
ModulePicker {
title: "Left island"
icon: "󰁍"
key: "left"
}
ModulePicker {
title: "Right island"
icon: "󰁔"
key: "right"
}
PreferenceChoice {
label: "Workspace style"
description: "\"bar\" uses the style from Settings → Bar"
icon: "󰕮"
setting: "notch.workspaceStyle"
choices: ["bar", "numbers", "roman", "kanji", "dots", "pacman"]
}
}
SettingsSection {
title: "Open notch"
description: "Dashboard pages on the left (scroll to switch), controls and weather in the middle, notifications on the right. The cog edits its tiles in place, separately from the Control Center."
enabled: root.options.enabled
PreferenceToggle { PreferenceToggle {
label: "Glassy when open" label: "Open on Media while audio plays"
description: "Keeps the colour and opacity on the docked notch; the open notch fades back to the normal glass" description: "Otherwise it opens on the last page"
icon: "󰂵" icon: "󰝚"
setting: "notch.glassOnOpen" setting: "notch.mediaFirst"
} }
PreferenceToggle { ModulePicker {
visible: root.options.glassOnOpen title: "Module strip"
label: "Launcher keeps notch colour" description: "Bar modules left of the clock, e.g. AI usage or the screen recorder. The mouse wheel scrolls it when it overflows."
description: "Off: the launcher turns glassy when open too" icon: "󰹑"
icon: "󰍉" key: "strip"
setting: "notch.launcherMatch"
} }
PreferenceSlider {
label: "Opening speed"
description: "Notch and launcher; 100% follows the shell's animation duration"
icon: "󰓅"
setting: "notch.openSpeed"
from: 25
to: 300
step: 5
unit: "%"
}
PreferenceSlider {
label: "Closing speed"
description: "100% follows the shell's animation duration"
icon: "󰾆"
setting: "notch.closeSpeed"
from: 25
to: 300
step: 5
unit: "%"
}
PreferenceSlider {
label: "Colour change speed"
description: "How fast the docked colour turns glassy when opening (closing never outlasts the close)"
icon: "󰏘"
setting: "notch.colorSpeed"
from: 25
to: 300
step: 5
unit: "%"
} }
SettingsSection {
title: "Colour"
description: "0% opacity is the normal glass. Raise it towards a solid colour: e.g. 50% with a purple colour, or 100% black for OLED."
enabled: root.options.enabled
SettingRow { SettingRow {
title: "Notch colour" title: "Notch colour"
description: root.options.color ? "Custom colour" : "Glass tint (Appearance)" description: root.options.color ? "Custom colour" : "Glass tint (Appearance)"
@@ -155,60 +160,61 @@ SettingsPage {
onChosen: color => ConfigService.setValue("notch.color", color.toString()) onChosen: color => ConfigService.setValue("notch.color", color.toString())
} }
} }
PreferenceSlider {
label: "Opacity"
icon: "󰃟"
setting: "notch.opacity"
from: 0
to: 100
step: 1
unit: "%"
} }
SettingsSection {
title: "Opening"
enabled: root.options.enabled
PreferenceToggle { PreferenceToggle {
label: "Open on Media while audio plays" label: "Glassy when open"
description: "Otherwise it opens on the last page" description: "The open notch fades back to the normal glass; the docked notch keeps the colour"
icon: "󰝚" icon: "󰂵"
setting: "notch.mediaFirst" setting: "notch.glassOnOpen"
} }
SettingRow { PreferenceToggle {
title: "Preview" visible: root.options.glassOnOpen
icon: "󰈈" label: "Launcher keeps notch colour"
GlassButton { description: "Off: the launcher turns glassy too"
objectName: "notchOpenButton" icon: "󰍉"
text: "Open notch" setting: "notch.launcherMatch"
enabled: root.options.enabled
onClicked: ShellState.openNotch()
} }
} PreferenceSlider {
} visible: root.options.glassOnOpen
SettingsSection { label: "Colour change speed"
title: "Workspaces" description: "How fast it turns glassy when opening (closing never outlasts the close)"
enabled: root.options.enabled
PreferenceChoice {
label: "Workspace style"
description: "Notch mode only; \"bar\" uses the style from Settings → Bar"
icon: "󰏘" icon: "󰏘"
setting: "notch.workspaceStyle" setting: "notch.colorSpeed"
choices: ["bar", "numbers", "roman", "kanji", "dots", "pacman"] from: 25
to: 300
step: 5
unit: "%"
} }
} }
SettingsSection { SettingsSection {
title: "Modules" title: "Animation"
description: "Which bar modules show in notch mode. The strip sits left of the clock in the open notch; the mouse wheel scrolls it sideways when it overflows." description: "Notch and launcher; 100% follows the shell's animation duration."
enabled: root.options.enabled enabled: root.options.enabled
ModulePicker { PreferenceSlider {
title: "Notch strip" label: "Opening speed"
description: "Left of the clock in the open notch, e.g. AI usage or the screen recorder" icon: "󰓅"
icon: "󰹑" setting: "notch.openSpeed"
key: "strip" from: 25
to: 300
step: 5
unit: "%"
} }
ModulePicker { PreferenceSlider {
title: "Left island" label: "Closing speed"
icon: "󰁍" icon: "󰾆"
key: "left" setting: "notch.closeSpeed"
from: 25
to: 300
step: 5
unit: "%"
} }
ModulePicker {
title: "Right island"
icon: "󰁔"
key: "right"
}
}
SettingNote {
text: "Super+N switches between notch mode and the full bar. The cog in the open notch edits its tiles in place, separately from the Control Center. Follow Control Center (in that editor) mirrors the Control Center again."
} }
} }