Skip to content

Floor Apple Silicon top bars to the camera notch cutout - #13478

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/apple-notch-reserve
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/apple-notch-reserve

Conversation

@AnPod

@AnPod AnPod commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

On Apple Silicon laptops with a display notch (MacBook Pro 14"/16", MacBook Air), the top bar height was previously fixed at barSize (26px default), leaving center widgets directly behind the camera housing.

This change:

  1. Calculates the physical camera notch height from measured panel tables and screen geometry in BarModel.js.
  2. Floors the top bar height in shell/plugins/bar/Bar.qml to the notch cutout on Apple Silicon devices.
  3. Supports a calibrated [bar] notch-height override in shell/Commons/Style.qml.
  4. Adds migration to clear center widgets and move them right on Apple Silicon machines.
  5. Adds test suite test/shell.d/bar-notch-test.sh verifying cutout height derivations, override behavior, and layout migrations.

Fixes #13058

@llstrk

llstrk commented Sep 28, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Verified: at integer scales the notch math gives the expected floors, and bar-notch-test.sh is a real regression test (all 20 assertions pass on this head; on the merge-base it fails at the first one with bar.notchHeight is not a function). notchHeight results from a direct run of BarModel.js:

Panel (logical size, Qt ratio) Floor
MacBook Pro 14" or 16" at scale 2 32 (the 64-row table entry)
MacBook Pro 14" or 16" at scale 1 64
MacBook Air 13.6" at scale 2 32 (full strip, no table entry)
Notch hidden (Asahi default show_notch=0, 16:10 mode), M1 Air 0
External DP-1, 90° rotated panel 0

The floor reaches the reserved area: with ExclusionMode.Auto, Quickshell sets the exclusive zone from implicitHeight. Each bar computes its floor from its own screen.

The review found an overlap with open PR #13362, a migration that reaches much further than notched top bars, a hidden-bar regression, an override that ignores the panel checks, and an unrelated Windows VM commit.

Overlap with open PR #13362

#13362 ("Converge omarchy-mac and omarchy-mx-mac into upstream Omarchy") also implements the camera-notch floor (section 9 of its description). Both PRs add bin/omarchy-hw-apple-silicon and test/shell.d/bar-notch-test.sh with different contents, and both edit the same regions of Bar.qml (after barSize, and the margins/implicitHeight block) and BarModel.js. #13362's version already covers several points below: it parks a hidden bar by its full thickness, applies the calibration only on a panel with a cutout, reads the physical mode from Hyprland.monitorFor(screen), which also works at fractional scales, and draws the center section beside the right one at render time instead of migrating user config.

Impact: the two PRs conflict as add/add on two files and textually in Bar.qml and BarModel.js, and would ship two different Apple Silicon detectors.

Suggested change: reconcile with #13362 so only one implementation lands. At minimum, avoid adding a second, different omarchy-hw-apple-silicon.

The migration rewrites more layouts than notched top bars, and misses new installs

migrations/1789123456.sh checks only omarchy-hw-apple-silicon (grep -qi apple /proc/device-tree/compatible), then moves every center widget to the right.

gate: any Apple Silicon device tree
  ├─ notched Pro/Air with notch visible (show_notch=1)  -> intended case
  ├─ notched Pro/Air on Asahi's default show_notch=0   -> rewritten, floor is 0 (panel is 16:10)
  ├─ Mac mini, M1 Air, M1/M2 13" Pro                    -> rewritten, no notch
  └─ bottom or side bar                                 -> rewritten, never under the camera

In an isolated run, bottom-bar and left-bar fixtures were rewritten as well. Whatever the user placed in the center is moved, while earlier bar migrations make narrow edits and avoid overriding a curated bar (for example 1785344985, "Respect a bar the user already curated"). Moving omarchy.indicators also separates its hover peek from the widget: with nothing active (and alwaysShow unset, the default) the widget is 0 px wide in the right section, and only hovering the now-empty middle of the bar (around the camera) reveals the inactive icons, next to the tray.

In the other direction, omarchy-provision-user --first-install marks every shipped migration as done (bin/omarchy-provision-user lines 122-127), and the shipped config/omarchy/shell.json still anchors omarchy.clock in the center. An Apple Silicon install finalized with --first-install therefore keeps the clock under the camera, and omarchy bar defaults brings the centered layout back after the migration ran. #13058's second expectation (a default layout that keeps the center clear) is therefore not met.

Impact: a one-time, user-visible layout change on machines that have no visible notch or no top bar, and no change for new installs or after omarchy bar defaults, which the issue's request for a notch-friendly default layout would cover.

Suggested change: gate on a visible notch (for example the eDP mode's aspect ratio or appledrm's show_notch) and on a top bar, or move the center aside at render time as #13362 does, so new installs and omarchy bar defaults are covered too.

Migration conventions: the file is mode 755 where agents/skills/migrations.md asks for 0644, it does not start with an echo like every other quattro migration, and the hand-picked 1789123456 sorts before 13 migrations already on quattro (omarchy-dev-add-migration derives the timestamp from the commit time). It also has no || rm -f "$tmp", so a jq failure (for example center stored as a string) leaves a temp file behind.

A hidden bar leaves a strip on notched panels

The hidden-bar margin still parks the bar by -root.barSize (Bar.qml 1260-1265), but the surface is now Math.max(root.barSize, notchFloor) tall.

Setup Floor Strip left on screen after hiding the bar
Default size-horizontal 26, scale 2 32 6 px
MacBook Air at 1.6 40 14 px
MacBook Pro 14" at 1.333 56 30 px

Notification toasts also still clear only shell.bar.barSize + Style.gapsOut (shell/plugins/notifications/Service.qml 50-52), so with the default gaps they overlap a floored bar by 1 px at a 32 px floor and more at larger floors.

Impact: hiding the bar on a notched panel leaves part of it visible, cutting through the widgets at larger floors. These figures come from the source arithmetic and were not observed on a compositor.

Suggested change: park and offset by the window's real height (barWindow.implicitHeight) rather than barSize. test/shell.d/bar-test.sh lines 59-63 pin the -root.barSize text and need updating with it.

[bar] notch-height applies to every top bar on the machine

notchFloor returns Style.bar.notchHeight whenever the host is Apple Silicon and the bar is at the top. The eDP and aspect-ratio checks only run inside BarModel.notchHeight, which the override skips.

Impact: a calibrated value also floors top bars on external monitors and on notch-hidden or non-notched panels.

Suggested change: apply the override only when the derived value for that screen is above 0. Written with a helper property, that variant still passes the PR's test; the test's regex rejects an inline version.

Fractional scales never use the measured table

screen.devicePixelRatio is Qt's integer wl_output scale, and Hyprland sends ceil(scale), so at fractional scales the reconstructed physical size does not match the table and notchHeight falls back to the full strip. Hyprland also snaps a requested 1.6 on the 14" panel to 1.333 (logical 2268x1473, ratio 2), giving a 56 px floor instead of the 48 px the table implies. The test case "MacBook Pro 14" at scale 1.6 uses its measured cutout" (1890x1227, ratio 1.6) is a combination Hyprland and Qt do not produce.

Impact: at fractional scales the bar is taller than the measured cutout, never shorter.

Suggested change: read the physical size and real scale from Hyprland.monitorFor(screen), and base the fractional test case on values Hyprland produces.

Unrelated Windows VM commit

Commit 2b4b0eba ("Clear setgid when hardening Windows VM mount folders (#1)") changes bin/omarchy-windows-vm and three tests. The PR description does not mention it, and it is also the first commit of #13480, #13477 and #13473. Dedicated PRs for the same setgid problem are also open (#13154, #13213, #12323).

Verified: the change itself is correct and needed. GNU chmod keeps an existing directory setgid bit for a 4-digit mode (chmod 0700 on a 2777 directory gives 2700, chmod 00700 gives 700), and dockur/windows sets an empty share to 2777, which then fails the exact-700 check on every relaunch. windows-vm-test.sh and windows-vm-compose-test.sh pass on this head and fail at the new assertions with the base script.

Impact: the same unrelated change travels in four open PRs alongside the dedicated ones, so whichever lands first leaves the others to conflict or carry a duplicate.

Suggested change: drop the commit here and land the fix once, through one PR.

Optional test improvement: the Bar.qml and Style.qml checks in bar-notch-test.sh are regexes over source text. Diagnostic mutants that remove notch-height from the shell.toml parser (making the override dead) or break the Apple probe command still pass, and so does removing the migration's Apple gate. Evaluating Style.qml's parser on a sample shell.toml would catch the first, and running the migration with a non-Apple stub would catch the third.

Smaller notes:

  • [bar] notch-height is not documented next to size-horizontal in docs/omarchy-shell.md, and manual/05-the-top-bar.md still describes the indicators, clock and weather as the center cluster.
  • Bar.qml repeats the helper's grep instead of calling omarchy-hw-apple-silicon, so the two can drift. grep -qi apple is a substring match.
  • The comment calls both table entries "measured on real hardware". The commit that added the 16" entry in omacom/omarchy-mac describes it as inferred from the 14".

Review information

Test scope: Source review of the head, merge-base and current quattro, plus Quickshell 0.3.1, Qt 6.11.2 Wayland, Hyprland 0.56.2, the Asahi appledrm driver and device trees, the omarchy-mac sources and the fork commits cited in #13058, GNU chmod and dockur/windows. BarModel.js, bar-notch-test.sh, bar-test.sh, windows-vm-test.sh, windows-vm-compose-test.sh, the migration (on synthetic shell.json fixtures with a stubbed Apple Silicon helper) and diagnostic mutants were run in an isolated sandbox. No compositor, QML runtime or Apple hardware was available, so the hidden-bar strip, toast overlap and fractional-scale floors come from source arithmetic, and the 64-row cutout depths are not confirmed on hardware. windows-vm-mount-boundary-test.sh could not run in the sandbox.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

Port the notch height stack so top bars reserve the measured camera cutout
on Asahi laptops, accept a calibrated [bar] notch-height override, and migrate
Apple Silicon layouts to keep center widgets off the housing.

Fixes omacom#13058

Co-authored-by: AnPod <AnPod@users.noreply.github.com>
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Heads-up: #13362, which the earlier review flagged as overlapping, was closed today and carried forward in #14431 (the omarchy-mac convergence). #14431 ships its own omarchy-hw-apple-silicon and notch handling at render time. This PR adds a different omarchy-hw-apple-silicon and the same bar-notch-test.sh path, so the two can't both land as written.

Separately, the earlier review's migration concerns are still open on this head:

  • migrations/1789123456.sh is mode 755, has no leading echo, and uses a hand-picked id that sorts before 13 migrations already on quattro.
  • It rewrites any Apple Silicon layout, including bottom and side bars and models without a notch.

Since #13641 is an identical copy, I'd suggest closing both and folding anything #14431 is missing (for example the measured cutout table) into that PR.

@omarchybot

Copy link
Copy Markdown
Collaborator

Closing as out of scope: Omarchy now supports only installs made from the official Omarchy ISO, and this change exists for Apple Silicon, which the ISO doesn't produce. We aren't taking on code paths for setups outside that, because nobody here can test or maintain them. The community-maintained omarchy-mac project is the place for Apple Silicon work. Thanks for the work that went into this. (Checked by Claude Opus 5.5; no second review.)

@omarchybot omarchybot closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apple Silicon regression: top bar no longer reserves the camera notch

5 participants