Automate Your Mac When You Walk Away

Locking your screen when you leave is good security practice. But what if you want your Mac to do more than just lock?

Maybe you want to pause Music when you leave and resume it when you return. Or turn off your desk lights when you walk away and turn them back on when you come back. Or only lock your Mac when you're at work but not at home?

ProximityLock now integrates with macOS Shortcuts. Instead of being limited to screen locking, you can trigger any automation you want, both when you leave and when you return.

Shortcuts?

macOS Shortcuts is Apple's automation framework. It lets you chain actions together: check your location, call APIs, control HomeKit devices, run scripts, send notifications or interact with other apps on your Mac.

ProximityLock now has a "Run Shortcut" option alongside "Lock Screen" and "Start Screensaver". When your device goes out of range, it executes your away shortcut. When your device returns to range, it can execute a different return shortcut, giving you complete control over both transitions.

ProximityLock Shortcuts Integration

Real Examples

These work both when you leave (away) and when you return. Configure different shortcuts for each action.

When You Leave (Away Shortcut)

Location-Aware Locking

A.k.a. Geofencing (sounds a bit scary?). But a shortcut can check how far or close you are from a specific location, like home, work, etc. Example shortcut here.

Smart Home Integration

When you walk away, turn off your desk lamp via HomeKit. Or set your Hue lights to "away" mode.

Music and Media

Pause YouTube or Music when you leave your desk.

Keyboard Lockout

If you have a cat, you know the problem. You leave your desk, the cat immediately lies down on that warm spot (your Mac), and suddenly your Slack has sent "jjggdsjgjjjkkkkkk" to someone, an app has been closed, or worse, something was deleted. A shortcut can call BetterTouchTool to disable keyboard and mouse.

API Webhooks

Call a webhook when you leave. Log your presence. Trigger a serverless function. Whatever your workflow needs.

When You Return (Return Shortcut)

Resume your music or media playback. Turn your desk lights back on. Re-enable your keyboard and mouse if you disabled them to prevent cat interference. Send a webhook that you're back at your desk.

How to Set It Up

Create shortcuts in the macOS Shortcuts app. Name them something like "Mac Away" and "Mac Return". Add whatever actions you want to each.

In ProximityLock settings, select "Run Shortcut" as your action. Enter your away shortcut name, and optionally configure a different shortcut for when you return.

When your Bluetooth device goes out of range, ProximityLock executes your away shortcut. When it returns to range, it executes your return shortcut. You can still lock the screen from within your away shortcut if you want by adding Lock Screen or Start Screen Saver action.

Why?

It is all based on your feedback which is really honestly appreciated. Shortcuts integration was easy to develop and gives you much more control. ProximityLock still doesn't process any information like your location or need extra permissions.

Limitations

There are a few of them. Shortcuts run in the foreground briefly, so they're not completely invisible if it really matters. Complex shortcuts can take time to execute. If your shortcut fails, ProximityLock won't know it just fires and forgets so please test things out.

The Bottom Line

It's about giving you control over what happens when you walk away from your Mac. Standard locking or screensaver when you need it. Custom workflows when you want more.

If you prefer the App Store, there is now ProximityLock's sister app ProximityShortcuts available on the Mac App Store. It works exclusively with Shortcuts (no direct screen locking due to App Store restrictions), but Shortcuts can still be configured to lock your screen or start the screensaver.


Updated: November 2025

Published: October 2025