Add a notch mode that splits the bar around a pocket-dots style notch
Settings → Notch switches it on. The bar becomes left and right islands with a notch at the top centre. Super+C, Super+X and a click on the notch open a three-column panel: dashboard pages on the left (Media, Performance, Calendar; the wheel switches them), the Control Center tiles and weather in the middle, and notifications on the right. The Performance card opens the full "Your computer" view. The launcher drops out of the notch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
178041edf9
commit
5217af4f67
20 files changed
+919
-14
No files matched your search
+43
-3
@@ -3,6 +3,7 @@ import QtQuick.Shapes
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "../components"
|
||||
import "../notch"
|
||||
import "../core"
|
||||
import "../services"
|
||||
import "../theme"
|
||||
@@ -18,7 +19,14 @@ PanelWindow {
|
||||
// The window reaches below the bar (input is masked to the bar) so the
|
||||
// HyprGlass layer edge is not on the bar's bottom edge, where drawers join.
|
||||
implicitHeight: BarDrawers.bottom + BarDrawers.overhang
|
||||
mask: Region { item: panel }
|
||||
// Notch mode splits the bar into a left island, the centre notch and a
|
||||
// right island; only those take input.
|
||||
readonly property bool notch: ShellState.notchMode
|
||||
mask: Region {
|
||||
item: root.notch ? leftIsland : panel
|
||||
Region { item: root.notch ? notchPill : null; intersection: Intersection.Combine }
|
||||
Region { item: root.notch ? rightIsland : null; intersection: Intersection.Combine }
|
||||
}
|
||||
color: Theme.transparent
|
||||
// Reserve the bar itself (margin + height), not the overhang below it, so
|
||||
// windows tile beneath the bar instead of under it.
|
||||
@@ -29,18 +37,21 @@ PanelWindow {
|
||||
Component.onDestruction: TrayService.unregisterBar(root)
|
||||
GlassPanel {
|
||||
id: panel
|
||||
visible: !root.notch
|
||||
x: root.outerMargin; y: root.outerMargin
|
||||
width: root.width - 2 * root.outerMargin
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
border.width: 0
|
||||
ModuleRow { position: "left"; barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
// In notch mode the side rows move into their islands; the notch replaces the centre.
|
||||
ModuleRow { id: leftRow; parent: root.notch ? leftIsland : panel; position: "left"; barScreen: root.screen; anchors.left: parent.left; anchors.leftMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
ModuleRow { position: "center"; barScreen: root.screen; anchors.centerIn: parent }
|
||||
ModuleRow { position: "right"; barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
ModuleRow { id: rightRow; parent: root.notch ? rightIsland : panel; position: "right"; barScreen: root.screen; anchors.right: parent.right; anchors.rightMargin: 6; anchors.verticalCenter: parent.verticalCenter }
|
||||
}
|
||||
// Outline with openings where drawers hang from the bar.
|
||||
Shape {
|
||||
id: outline
|
||||
visible: !root.notch
|
||||
x: panel.x
|
||||
y: panel.y
|
||||
width: panel.width
|
||||
@@ -63,4 +74,33 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Notch mode -------------------------------------------------------------
|
||||
GlassPanel {
|
||||
id: leftIsland
|
||||
visible: root.notch
|
||||
x: root.outerMargin
|
||||
y: root.outerMargin
|
||||
width: leftRow.implicitWidth + 12
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
}
|
||||
GlassPanel {
|
||||
id: rightIsland
|
||||
visible: root.notch
|
||||
x: root.width - root.outerMargin - width
|
||||
y: root.outerMargin
|
||||
width: rightRow.implicitWidth + 12
|
||||
height: BarDrawers.height
|
||||
radius: BarDrawers.radius
|
||||
}
|
||||
NotchPill {
|
||||
id: notchPill
|
||||
barScreen: root.screen
|
||||
x: Math.round((root.width - width) / 2)
|
||||
y: 0
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
// The open notch window draws over this spot on its own screen.
|
||||
visible: root.notch && !(ShellState.notchWindow && ShellState.notchWindow.visible && ShellState.notchWindow.screen === root.screen) && !(ShellState.launcherOpen && ScreenService.current(ShellState.launcherScreen) === root.screen)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user