Skip to content

CaptureClub-LLC/camera-controller

Repository files navigation

Head Pointer Camera Switcher

A lightweight macOS menu bar utility that allows you to quickly switch the camera source used by the macOS Accessibility "Head Pointer" feature.

If you use head tracking for mouse control and frequently switch between different webcams or capture devices, this tool saves you from navigating deep into System Settings every time.

Menu Bar Icon

Features

  • Menu Bar Access: Lives discreetly in your status bar—no Dock icon.
  • Auto-Discovery: Automatically lists all available video input devices (cameras).
  • One-Click Switch: Select a camera from the menu, and the app automatically navigates System Settings to apply the change.
  • Plug & Play: Updates the camera list in real-time as you plug in or unplug devices.

Installation

  1. Download the latest release (or build from source).
  2. Move HeadPointerSwitcher.app to your Applications folder.
  3. Double-click to run.

First Run Permissions

Because this app controls the System Settings window to automate the camera change, macOS requires you to grant it Accessibility permissions.

  1. The first time you try to switch a camera, macOS will prompt you.
  2. Click Open System Settings.
  3. Toggle the switch ON for "Head Pointer Switcher".
  4. You may need to restart the app or try switching again.

Building from Source

This project is written in Objective-C. You can compile it using clang or Xcode command line tools.

Prerequisites

  • macOS 13.0 (Ventura) or later.
  • Xcode Command Line Tools installed (xcode-select --install).

Compile Command

Run the following command in the terminal to compile the binary:

clang -fobjc-arc -framework Cocoa -framework AVFoundation main.m -o HeadPointerSwitcher

Packaging as an App Bundle

To create a standalone .app bundle:

# Create directory structure
mkdir -p HeadPointerSwitcher.app/Contents/MacOS
mkdir -p HeadPointerSwitcher.app/Contents/Resources

# Copy Info.plist (ensure you have the file) and binary
cp Info.plist HeadPointerSwitcher.app/Contents/Info.plist
cp HeadPointerSwitcher HeadPointerSwitcher.app/Contents/MacOS/

# Make executable
chmod +x HeadPointerSwitcher.app/Contents/MacOS/HeadPointerSwitcher

How It Works

This application utilizes UI Scripting via the macOS Accessibility API (AppleScript). When you select a camera:

  1. The app launches System Settings via a deep link (x-apple.systempreferences:com.apple.Accessibility-Settings.extension?PointerControl).
  2. It locates the "Head Pointer" configuration row.
  3. It opens the "Camera Options" sheet.
  4. It selects the requested camera from the internal dropdown menu.

License

MIT License. See LICENSE file for details.

About

A small Objective-C Mac OSX Utility for quickly switching cameras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors