Skip to content

✨ Add 'Ignore notch' option for consistent top padding across screens#1048

Merged
mrkai77 merged 2 commits into
mrkai77:developfrom
kjvdven:feature/ignore-notch
Feb 17, 2026
Merged

✨ Add 'Ignore notch' option for consistent top padding across screens#1048
mrkai77 merged 2 commits into
mrkai77:developfrom
kjvdven:feature/ignore-notch

Conversation

@kjvdven
Copy link
Copy Markdown
Contributor

@kjvdven kjvdven commented Feb 16, 2026

Adds an defaults write option "Ignore notch". When enabled, the notch height is subtracted from the top padding on notched displays, so the effective distance from the screen's top edge matches non-notch displays.

Users can enable with:

defaults write com.MrKai77.Loop ignoreNotch -bool true

Reset with:

defaults delete com.MrKai77.Loop ignoreNotch

Users with an external menu bar (e.g. SketchyBar) and the system menu bar hidden experience inconsistent top padding between notched and non-notch displays. On a notched MacBook, NSScreen.visibleFrame reserves space for the notch (~32pt), and the external bar padding stacks on top of that — resulting in more top gap than on an external monitor.

When "Ignore notch" is enabled, applyToBounds subtracts screen.menubarHeight from totalTopPadding (clamped to 0), compensating for the notch reserve. Backward-compatible: custom Codable init defaults ignoreNotch to false for existing configs.

Fixes #691

How has this been tested?

Tested on a MacBook Pro (notch) with an external monitor, system menu bar hidden, SketchyBar as external bar with 40px external bar padding configured in Loop.

  • External monitor: top padding remains 40px as configured
  • defaults write com.MrKai77.Loop ignoreNotch -bool true: top padding matches external monitor (40px from screen top)
  • defaults delete com.MrKai77.Loop ignoreNotch: top padding is 40px + notch height (existing behavior)
  • Existing configs without the new field load correctly (defaults to false)

macOS 15, Loop built from develop branch.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in this PR.

Please describe to which degree, if any, an LLM was used in creating this pull request.

This change was developed with assistance from Claude (Anthropic). The approach (subtracting screen.menubarHeight from top padding when the toggle is enabled) was designed collaboratively — the math and edge cases were worked through together, and all code was reviewed, understood, and tested by the contributor on a real notch + external monitor setup.

Copy link
Copy Markdown
Owner

@mrkai77 mrkai77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Overall, this works well and the logic is correct. However, I think ignoreNotch belongs as a global setting rather than on PaddingConfiguration.

A couple of reasons:

  1. It's a hardware/setup concern, not a padding preference. Whether to compensate for the notch is a property of the user's display setup, not a specific padding configuration. Conceptually it fits better as a global toggle (e.g. Defaults[.ignoreNotch]). Given that this is a fairly niche setup (hidden menu bar + external bar + notch display), I'd lean toward making it a defaults write option rather than a visible UI toggle. This also avoids adding complexity to the settings UI for something most users won't need.
  2. It avoids the custom Codable conformance. Right now the PR replaces the auto-synthesized Codable with a manual init(from:) just to default ignoreNotch to false for existing configs. Pulling the flag out into a separate Defaults key lets PaddingConfiguration go back to synthesized conformance, keeping it clean.

@mrkai77 mrkai77 changed the title ✨ Add 'Ignore notch' option for consistent top padding across display… ✨ Add 'Ignore notch' option for consistent top padding across screens Feb 17, 2026
@kjvdven kjvdven force-pushed the feature/ignore-notch branch 2 times, most recently from 3c546c2 to 7064917 Compare February 17, 2026 08:19
@kjvdven kjvdven force-pushed the feature/ignore-notch branch from 7064917 to 9920c5b Compare February 17, 2026 08:22
@kjvdven
Copy link
Copy Markdown
Contributor Author

kjvdven commented Feb 17, 2026

Thnx for the review,

  1. I changed the code to work with a default write instead of a UI toggle.
  2. Removed the custom Codable conformance

Copy link
Copy Markdown
Owner

@mrkai77 mrkai77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mrkai77 mrkai77 merged commit ad9d9db into mrkai77:develop Feb 17, 2026
@cyb3rko
Copy link
Copy Markdown

cyb3rko commented Mar 16, 2026

@kjvdven Does that still work for you?
I can not get it to work somehow :(

@kjvdven
Copy link
Copy Markdown
Contributor Author

kjvdven commented Mar 16, 2026

@kjvdven Does that still work for you? I can not get it to work somehow :(

Have you set the variable in the terminal?

defaults write com.MrKai77.Loop ignoreNotch -bool true

@cyb3rko
Copy link
Copy Markdown

cyb3rko commented Mar 16, 2026

Have you set the variable in the terminal?

I have, but I can not see any changed behaviour.
Any other setting that is required for that option to work?

@mrkai77
Copy link
Copy Markdown
Owner

mrkai77 commented Mar 16, 2026

@cyb3rko could you check if the macOS window manager is enabled in the Advanced tab? That setting can interfere with this feature. Also, make sure you’re running the latest development version :)

@cyb3rko
Copy link
Copy Markdown

cyb3rko commented Mar 16, 2026

Well, call me stupid.
I just realized that it's not included in 1.4.2, works now on pre-release version 👍.

Thanks to both of you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Different padding for notched internal monitor and external monitor

3 participants