Coder Social home page Coder Social logo

magic-trackpad-switcher's Introduction

magic-trackpad-switcher

The tool to switch Magic Trackpad connections between multiple Mac devices

Features

  • When clamshell mode is enabled...
    1. Unpair Magic Trackpad
    2. Power off the bluetooth module
    3. Sleep system
  • When the system wakes up from sleep...
    1. Power on the bluetooth module
    2. Pair Magic Trackpad

Install

Install magic-trackpad-switcher.

brew install mizdra/tap/magic-trackpad-switcher

Then, add the device ID of your Magic Trackpad to configuration file:

# Check the device ID of your Magic Trackpad
blueutil --paired

# Add the device ID of your Magic Trackpad to configuration file
mkdir -p ~/.config/magic-trackpad-switcher
echo "xx-xx-xx-xx-xx-xx" > ~/.config/magic-trackpad-switcher/TRACKPAD_DEVICE_ID

Finally, start magic-trackpad-switcher service.

brew services start mizdra/tap/magic-trackpad-switcher

Uninstall

brew services stop mizdra/tap/magic-trackpad-switcher
brew uninstall mizdra/tap/magic-trackpad-switcher
rm -rf ~/.config/magic-trackpad-switcher

Update

brew upgrade
brew services restart mizdra/tap/magic-trackpad-switcher

Debug

Run script from source code

git clone [email protected]:mizdra/magic-trackpad-switcher.git
swift run

Logging

tail -F $(brew --prefix)/var/log/magic-trackpad-switcher.log
tail -F $(brew --prefix)/var/log/magic-trackpad-switcher.error.log

magic-trackpad-switcher's People

Contributors

mizdra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.