When at home I use my 13" MacBook Pro hooked up to an 27" external monitor. When working on my 27" screen I prefer to have a visible dock at all times. I have enough screen real estate to afford this luxury.

When I'm on the road working on my 13" screen I prefer to automatically hide the dock as it really gets in the way when screen real estate is limited.

I now manually switch between enabling and disabling hiding (using ⌥⌘D) but I would prefer this to happen automatically. Can I enable hiding the dock on my MacBook monitor and disable hiding the dock on my external monitor?


I was able to use the previously suggested ControlPlane app along with some simple shell scripts to get this working.

First, I created a context for having my Thunderbolt Display plugged in ("Desk"), and one that negated that choice ("Lap"). Next, I made two simple shell scripts to toggle the autohide setting and restart the Dock. I put them in a .controlplane directory in my home folder.


defaults write com.apple.dock autohide -bool true && killall Dock


defaults write com.apple.dock autohide -bool false && killall Dock

I then set those files to be executable.

Lastly, I set the correct script to run for the appropriate ControlPlane context. (Note: I had to show hidden files in the dialog with "⌘+⇧+.")

  • Does this solution allow for the dock to be shown on the MacBook monitor AND hidden on the external monitor? Or does it this show the dock on both screens when an external monitor is plugged in?
    – Zaki Aziz
    Apr 7 '17 at 23:17
  • I believe it'll show on whichever monitor is set to be primary (when in Displays > Arrangement, the one with the white bar on top). Feb 7 '20 at 16:30
  • 1
    Instead of killing dock, you can use an AppleScript: tell application "System Events" to set the autohide of the dock preferences to true.
    – zed
    Jan 24 at 17:56

Applications like Sidekick or ControlPlane allow you to change settings (network, desktop picture, custom terminal actions) based on location evidences (geolocation, attached devices...etc). I'm sure you will be able to use one of those to detect you are at your desk with your 27" plugged in and run a command disabling auto-hide.

  • Thanks for the suggestions! Sidekick doesn't really apply because it's purely based on geolocation and I often use my Macbook in the vicinity of my monitor without it being plugged in. ControlPlane does look potentially interesting though. I'll try it out and accept your answer if it works. Apr 30 '13 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .