Giter Club home page Giter Club logo

magic-trackpad-switcher's Introduction

magic-trackpad-switcher

Makes it more convenient to use one Apple Magic Trackpad 2 via Bluetooth on multiple devices (Mac/Linux).
Connect or disconnect with one click.

preview

Get Started

Mac (Shell Script)

  1. Install dependencies: brew install blueutil
  2. Add the Bluetooth address of your trackpad (e.g. 18-7e-b9-69-ff-cd) to the script. The path variable may also need to be adjusted. If the workflow is used, document.wflow inside switch-trackpad.workflow must also be modified.
  3. Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.

Mac (Quick Action / Touch Bar Workflow)

  1. Install dependencies: brew install blueutil
  2. Edit document.wflow inside switch-trackpad.workflow: Add the Bluetooth address of your trackpad (e.g. 18-7e-b9-69-ff-cd) to the script. The path variable may also need to be adjusted.
  3. Add the workflow to the Touch Bar: https://support.apple.com/guide/automator/use-quick-action-workflows-aut73234890a/mac
  4. Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.

Linux (Bash Script)

  1. Ensure that all dependencies (bluetoothctl, expect) are installed.
  2. Add the Bluetooth address of your trackpad (e.g. 18:7E:B9:69:FF:CD) to the script.
  3. You may want to use a keyboard shortcut or some other feature of your desktop environment to quickly launch the script. I use the following Gnome shell extension for this purpose: https://github.com/lucaskenda/handyscripts2
  4. Start the script on the device that you want to disconnect the trackpad from. Then start the script on the device that you want the trackpad to connect to.

Alternatives

  • Simply use cables
  • Use KVM software like Synergy or Barrier

magic-trackpad-switcher's People

Contributors

vnc0 avatar

Watchers

 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.