S Stephane Poulin Back to projects
Published Project

YouShallNotMove

A macOS menu bar app that keeps your windows where you put them. It blocks window drags unless you hold a modifier key, so a click on a title bar with a shaky hand no longer nudges a window by a pixel or two.

Requires
macOS 13
Runs on
Apple silicon, Intel
Permission
Accessibility
Price
Free
If the video does not load here, watch it on YouTube.

What It Does

Drags cancelled

On a title bar or an empty toolbar area, a drag does nothing, while a plain click still brings the window forward.

Snap back

On other areas, such as custom title bars like Chrome's tab strip, the window returns to where it was.

Your modifier

Hold ⌘, ⌥, ⌃ or ⇧, your choice, to move a window normally.

The rest still works

Resizing from an edge, double-clicking a title bar and the green button work as usual.

Gentler mode

Snaps windows back only when you release the mouse.

One switch

The lock turns on or off from the menu bar, and the app can open at login.

About This Project

Clicking a title bar to bring a window forward often moves it by one or two pixels, just enough to undo a careful layout. YouShallNotMove locks windows in place: a click still activates the window, but dragging it does nothing unless you hold a modifier key, ⌘ by default.

It lives in the menu bar, where one switch turns the lock on or off.

Built With

  • Swift
  • AppKit
  • Quartz event tap
  • Accessibility API
  • Core Graphics

The app icon is drawn with Core Graphics.

Permissions

To watch and hold back mouse drags, the app needs the Accessibility permission, granted once in System Settings › Privacy & Security › Accessibility.

Get It

The download is a disk image for Apple silicon and Intel Macs; the repository's README shows how to open it the first time and allow Accessibility. Or build and install it with ./build.sh from the repository: it needs the Xcode command line tools.

More Projects