Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use your MacBook's notch like Dynamic Island for temporary storing files and AirDrop

License

Notifications You must be signed in to change notification settings

sonigeez/NotchDrop

 
 

Repository files navigation

Notch Counter (Minimal NotchDrop)

A minimal macOS application that displays a simple counter in a popover anchored to the display notch.

Features

  • Counter Display: Shows an integer counter.
  • Increment/Decrement: Buttons to increase or decrease the counter value.
  • Notch Integration:
    • The popover appears attached to the screen notch.
    • Clicking near the notch area (or a defined trigger) opens/closes the popover.
    • The popover automatically closes when the application loses focus.
  • Launch at Login: Can be configured to launch automatically when the user logs in.

Project Overview

This application is a significantly stripped-down version of the original NotchDrop application, focusing solely on demonstrating a basic notch-integrated UI with a counter. It's built using SwiftUI for the UI elements and AppKit for window management and system event handling.

Core Components:

  • AppDelegate.swift: Manages the application lifecycle.
  • NotchViewModel.swift / NotchViewModel+Events.swift: Handles the state (counter value, popover visibility) and event logic (mouse clicks, app focus).
  • NotchContentView.swift: Defines the UI for the counter and buttons.
  • NotchView.swift: The main SwiftUI view for the popover.
  • NotchWindowController.swift / NotchWindow.swift: Manage the custom, transparent window that acts as the popover.
  • EventMonitors.swift / EventMonitor.swift: Handle global mouse event monitoring.
  • main.swift: Application entry point.

Building and Running

  1. Open NotchDrop.xcodeproj in Xcode.
  2. Select the NotchDrop scheme.
  3. Build and run the application (Cmd+R).

Purpose

This project serves as a learning example or a starting point for building more complex macOS notch applications with SwiftUI.

About

Use your MacBook's notch like Dynamic Island for temporary storing files and AirDrop

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%