TheBoringWorker
is a Swift-based macOS application designed to interface with the boring.notch
service. It communicates using macOS Distributed Notification Center to send and receive notifications. TheBoringWorker
sends data and notifications to boring.notch
, which handles UI integration.
- Send Data: Transmits data to
boring.notch
. - Receive Notifications: Listens for notifications from
boring.notch
. - Immediate Notifications: Supports sending notifications with an "deliverImmediately" flag.
- macOS 14 or later
- Xcode 15 or later
-
Clone the Repository
git clone https://github.com/TheBoredTeam/TheBoringWorker.git cd TheBoringWorker
-
Open the Project
Open the
TheBoringWorker.xcodeproj
file in Xcode:open TheBoringWorker.xcodeproj
-
Build and Run
Build and run the project in Xcode. Ensure all necessary permissions are granted for notifications and inter-process communication.
To initialize the notifier, use the following Swift code:
import TheBoringWorkerNotifier
let notifier = TheBoringWorkerNotifier()
To post a notification, use the following Swift code snippet: See example here, you can create a method here and this is vm
can be passed to your helper classes.
notifier.postNotification(name: "theboringteam.theboringworker.togglemic", userInfo: ["key": "value"])
To set up an observer for notifications, use the following Swift code:
notifier.setupObserver(notification: notifier.toggleMicNotification) { notification in
// Handle the notification
print("Mic toggle notification received")
}
toggleMicNotification
toggleHudReplacementNotification
showClipboardNotification
sneakPeakNotification
micStatusNotification
Create your own notifications using WorkerNotification
struct available with TheBoringWorkerNotifier
Setup a new observer using notifier.setupObserver
method here: Click here
The user interface for TheBoringWorker
is integrated within boring.notch
. TheBoringWorker
focuses on backend operations and notification handling, while boring.notch
handles the user interface components.
So new ui elements goes into: Check this
For details on integrating TheBoringWorker
with boring.notch
, please refer to the boring.notch documentation.
- Fork the Repository
- Create a Feature Branch
- Commit Your Changes
- Push to the Branch
- Open a Pull Request
For more details, please refer to our contributing guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
For any issues or questions, please open an issue on GitHub.