Skip to main content

Automatically connect or disconnect a Bluetooth speaker when a specific display is connected on macOS.

Project description

Monnect

Automatically connect or disconnect a Bluetooth speaker when a specific monitor is connected on macOS.

Monnect runs as a background LaunchAgent and manages Bluetooth audio based on display state.


Features

  • Auto-connect speaker when monitor is detected
  • Auto-disconnect when monitor is removed
  • Debounced monitor detection (no flicker)
  • monnect doctor for environment validation
  • monnect status for live system state
  • CLI lifecycle management
  • Installable via pipx

Requirements

  • macOS
  • Python 3.9+
  • Homebrew
  • blueutil (auto-installed during setup if missing)

Installation

Recommended:

brew install pipx
pipx ensurepath
pipx install monnect

For development:

git clone https://github.com/aki21j/Monnect.git
cd Monnect
pipx install -e .

Setup

Run interactive setup:

monnect setup

This will:

  • Detect available displays
  • Detect paired Bluetooth devices
  • Install background service

Commands

Start service:

monnect start

Stop service:

monnect stop

Check status:

monnect status

Run diagnostics:

monnect doctor

Uninstall service:

monnect uninstall

How It Works

Monnect:

  1. Monitors display state using system_profiler
  2. Checks Bluetooth state via blueutil
  3. Applies debounced logic
  4. Connects or disconnects speaker accordingly
  5. Runs continuously via macOS LaunchAgent

Development

pipx uninstall monnect
pipx install -e .

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monnect-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

monnect-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file monnect-1.0.0.tar.gz.

File metadata

  • Download URL: monnect-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for monnect-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eadddeedf82e7d59f7ac91000bfe69dc296ae54780fcad3dde868fd498710a45
MD5 27cf0108a2d75fd8aac5abe8b9f8c52f
BLAKE2b-256 b1418427eaec872d04e1f3b8ec85982834e54f2a18e2c52eac45268fbb652cfe

See more details on using hashes here.

File details

Details for the file monnect-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: monnect-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for monnect-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b8a4a692b7d1702dd965835fbca656976e1472826667c5e4c8d8e1ddd9b12f
MD5 b4259d8982ffe95f99ea789509868ada
BLAKE2b-256 0c5d315c544b53c94835336f7f3cd8bd4e384b23a74040fe0cd197645da6d1fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page