Skip to content

Base for the boring worker you may wanna create for boring notch

Notifications You must be signed in to change notification settings

TheBoredTeam/TheBoringWorker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TheBoringWorker Documentation

TheBoringWorkerNotifier Build & Test

Overview

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.

Features

  • Send Data: Transmits data to boring.notch.
  • Receive Notifications: Listens for notifications from boring.notch.
  • Immediate Notifications: Supports sending notifications with an "deliverImmediately" flag.

Prerequisites

  • macOS 14 or later
  • Xcode 15 or later

Installation

  1. Clone the Repository

    git clone https://github.com/TheBoredTeam/TheBoringWorker.git
    cd TheBoringWorker
  2. Open the Project

    Open the TheBoringWorker.xcodeproj file in Xcode:

    open TheBoringWorker.xcodeproj
  3. Build and Run

    Build and run the project in Xcode. Ensure all necessary permissions are granted for notifications and inter-process communication.

Initialization

To initialize the notifier, use the following Swift code:

import TheBoringWorkerNotifier

let notifier = TheBoringWorkerNotifier()

Posting a Notification

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"])

Setting Up an Observer

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")
}

Available Notifications

  • toggleMicNotification
  • toggleHudReplacementNotification
  • showClipboardNotification
  • sneakPeakNotification
  • micStatusNotification

Create your own notifications using WorkerNotification struct available with TheBoringWorkerNotifier

How the heck boring.notch will know about the notification

Setup a new observer using notifier.setupObserver method here: Click here

80466

UI Integration

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.

Contributing

  1. Fork the Repository
  2. Create a Feature Branch
  3. Commit Your Changes
  4. Push to the Branch
  5. Open a Pull Request

For more details, please refer to our contributing guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any issues or questions, please open an issue on GitHub.

About

Base for the boring worker you may wanna create for boring notch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages