https://github.com/lakr233/notchnotification
Display Notification Inside Mac's Notch.
https://github.com/lakr233/notchnotification
Last synced: 3 months ago
JSON representation
Display Notification Inside Mac's Notch.
- Host: GitHub
- URL: https://github.com/lakr233/notchnotification
- Owner: Lakr233
- License: mit
- Created: 2024-09-19T14:14:00.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T11:03:06.000Z (8 months ago)
- Last Synced: 2025-04-05T20:34:09.984Z (3 months ago)
- Language: Swift
- Size: 482 KB
- Stars: 83
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NotchNotification
Display notifications through your device's notch area.
The code has been refactored from [NotchDrop](https://github.com/Lakr233/NotchDrop) and modified to better suit the current use case.
## Preview

## Platforms
NotchNotification supports all AppKit platforms and works even on devices without a notch.
```swift
platforms: [.macOS(.v12)],
```## Usage
To add this package to your project:
```swift
dependencies: [
.package(url: "https://github.com/Lakr233/NotchNotification.git", from: "1.1.0"),
]
```To display a notification, use the following code:
```swift
NotchNotification.present(message: message)
```For presenting an error notification with a custom interval:
```swift
NotchNotification.present(error: error, interval: 3)
```To fully customize the notification view:
```swift
NotchNotification.present(
bodyView: HStack {
Image(systemName: "hand.point.right")
Text(message).underline()
Image(systemName: "hand.point.left")
},
interval: interval
)
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
---
© 2024 Lakr Aream. All Rights Reserved.