Skip to content

lorenzozanee/NotchBlock

Repository files navigation

NotchBlock

NotchBlock Icon

Turn the Mac hardware notch into a time-blocking gateway.

Release License: MIT macOS 14.0+ Swift 6.1

English | 中文 | Français | Español | 日本語 | 한국어


NotchBlock is a minimalist, enforced time-blocking scheduler for macOS. It transforms the hardware notch into an invisible interaction point, and uses an unmissable full-screen overlay to interrupt you when a task ends — keeping you focused by force.

🎯 Hover over the notch → see today's schedule → full-screen reminder at task end → must confirm completion

✨ Features

Feature Description
🔲 Notch Hover Panel Hover over the notch for 0.5s — your schedule slides out gracefully
🛡️ Fullscreen Aware Auto-pauses notch detection during video, gaming, and presentations
Hard Interrupt Overlay Full-screen dimming overlay at task end — blocks all other interaction
⏱️ 5‑Minute Timeout Unacknowledged blocks are auto-marked "missed" with a system notification
📋 Daily Scheduler Minimal timeline list with automatic time‑conflict detection
🔄 History Correction Manually adjust task status for accurate time‑tracking review
🚀 Launch at Login One‑click toggle from the menu bar; runs quietly in the background
💾 Local Storage All data stored locally — no network, fully private

📥 Installation

Download the latest NotchBlock-*.dmg from Releases.

3‑Step Setup

After opening the DMG, follow the on‑window instructions:

  1. Drag to Applications — drop NotchBlock.app into your Applications folder
  2. Double‑click FixQuarantine.command — removes the quarantine attribute and launches the app (first launch requires right‑click → Open)
  3. Done — the menu bar icon appears; you're ready to go

💡 Why step 2? NotchBlock is not notarized by Apple (requires a $99/yr developer account). macOS quarantines downloaded apps. FixQuarantine.command runs xattr -cr /Applications/NotchBlock.app to clear this flag.

After first launch, grant these permissions:

Permission Purpose Settings Path
Accessibility Detecting fullscreen apps System Settings → Privacy & Security → Accessibility
Notifications Task timeout alerts System Settings → Notifications → NotchBlock

Manual Install

# If the DMG script won't run, do it manually:
xattr -cr /Applications/NotchBlock.app
open /Applications/NotchBlock.app

🏗️ Architecture

macOS 14.0+ · Swift 6.1 · SwiftUI + AppKit

Key APIs:

  • NSTrackingArea — notch‑region mouse tracking
  • NSPanel + .nonactivatingPanel — dropdown panel (doesn't steal focus)
  • CGShieldingWindowLevel() + .fullScreenAuxiliary — overlay that punches through
  • CGWindowList — fullscreen state detection
  • SMAppService — login item registration
  • UserNotifications — timeout banner alerts
  • UserDefaults / ISO 8601 JSON — local persistence

Project structure:

NotchBlock/
├── Models/           TimeBlock · BlockStatus
├── Managers/         TimeBlockStore · NotchTracker · NotchPanelController
│                     OverlayWindowController · BlockScheduler
├── Views/            MainSchedulerView · TimeBlockRowView · AddEditBlockView
│                     NotchPanelView · OverlayView
└── Utilities/        DateExtensions · LaunchManager

⌨️ Shortcuts

Shortcut Action
⌘O Open scheduler panel
⌘Q Quit NotchBlock

📝 Development

# Regenerate the Xcode project after adding/removing .swift files
python3 generate_xcode_project.py

# CLI build
xcodebuild -project NotchBlock.xcodeproj -scheme NotchBlock -configuration Release build

# Create DMG
./scripts/build-dmg.sh

📄 License

MIT License


Built with ❤️ for focused work · macOS Apple Silicon

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors