Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lakr233/notchnotification
Display Notification Inside Mac's Notch.
https://github.com/lakr233/notchnotification
Last synced: about 23 hours 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 (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T11:03:06.000Z (2 months ago)
- Last Synced: 2024-12-31T02:59:53.859Z (3 days ago)
- Language: Swift
- Size: 482 KB
- Stars: 70
- Watchers: 1
- Forks: 3
- 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
![Preview GIF](./Example/demo.gif)
## 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.