Skip to content

An app to help lock your Mac's Dock to your main screen. As the Dock can sometimes appear on secondary screens or move unexpectedly when multiscreens.

License

Notifications You must be signed in to change notification settings

aitiotekt/dock-cleat

Repository files navigation

DockCleat

DockCleat Icon

Lock your Mac's Dock to a specific screen and position

CI Version Swift macOS License

中文 | English


DockCleat is a macOS utility that helps you lock your Dock to a specific screen and position. When using multiple monitors, the Dock can sometimes appear on secondary screens or move unexpectedly. DockCleat monitors and enforces your preferred Dock configuration automatically.

✨ Features

  • 🔒 Dock Locking: Keep your Dock locked to a specific screen and position
  • 📍 Position Control: Choose between bottom, left, or right positioning
  • 🖥️ Multi-monitor Support: Select which screen should display the Dock
  • 🛡️ Real-time Event Blocking: Automatically prevents Dock movement attempts
  • 🎨 Theme & Localization: Supports light/dark themes and English/Chinese
  • 🚀 Launch at Login: Optionally start the app when you log in
  • 📊 Menu Bar Integration: Quick access to controls from the menu bar

📸 Screenshots

Main Window

Main Window

General Settings

General Settings

Menu Bar Context Menu

Menu Bar Context Menu

📋 Requirements

  • macOS 14.0 (Sonoma) or later
  • Accessibility permission (required for event blocking)

🚀 Installation

For End Users

  1. Go to Releases
  2. Download the latest DockCleat-v*.zip file
  3. Extract the ZIP file and move DockCleat.app to your Applications folder
  4. Launch DockCleat from Applications

For Developers

  1. Clone the repository:

    git clone https://github.com/aitiotekt/dock-cleat.git
    cd dock-cleat
  2. Open DockCleat.xcodeproj in Xcode

  3. Build the project (⌘R) or use the command line:

    xcodebuild -scheme DockCleat -configuration Release
  4. The built app will be in build/Build/Products/Release/DockCleat.app

📖 Usage

Main Window

The main window provides access to all settings through two tabs:

  • Dock Settings: Enable locking, choose position (bottom/left/right), select target screen, toggle auto-hide
  • General Settings: Language, theme, visibility options, launch at login, permissions, and status

Menu Bar

Click the menu bar icon for quick access to toggle locking, change settings, and open the main window.

First Launch

  1. Launch DockCleat and grant Accessibility permission when prompted
  2. Configure your preferred Dock position and target screen
  3. Enable Dock locking to start monitoring

🔧 How It Works

DockCleat uses Core Graphics Event Taps to intercept mouse events and prevent Dock movement attempts. It also uses AppleScript to control Dock settings and monitors screen configuration changes to automatically restore your preferred settings.

🔐 Privacy

DockCleat requires Accessibility permission to intercept mouse events. This permission is only used locally - no data is collected or transmitted.

🐛 Troubleshooting

  • Dock not locking: Ensure "Enable Dock Locking" is on and Accessibility permission is granted
  • High CPU usage: Dock locking is optimized to use minimal resources when disabled
  • Menu bar not showing: Check "Show in Menu Bar" in General Settings

📝 License

MIT License - see LICENSE file for details.

👤 Author

@aitiotekt

🙏 Acknowledgments

  • Partially referenced DockAnchor
  • Built with SwiftUI and Core Graphics
  • This project was developed with AI assistance

About

An app to help lock your Mac's Dock to your main screen. As the Dock can sometimes appear on secondary screens or move unexpectedly when multiscreens.

Topics

Resources

License

Contributing

Stars

Watchers

Forks