Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would still like to use the dock and toggle show/hide with the default keyboard shortcut, but just take the mouse trigger out of the equation completely.

I know similar questions have been asked but I am not looking to always hide, disable or remove the dock, just turn off the mouse trigger for it.

share|improve this question

From How to remove the Dock in Mac OS X Leopard:

defaults write tilesize -int 1
defaults write pinning -string start

This is kind of a workaround though:

It should be totally out of the way at that point unless you mouse all the way over in the extreme bottom left hand corner.

The above commands can be added to an Automator service, and yet another to enable things again, like:

defaults write tilesize -int 20
defaults write pinning -string middle

Both of these services can then be assigned a different hotkey. Or, to get toggling using a single Automator service, and hence using a single hotkey:

tileSize="$(defaults read tilesize)"
if [ "$tileSize" -ne 1 ]
  # Make the Dock autohide, as small as possible, and
  # move it into a corner
  defaults write autohide -boolean true
  defaults write tilesize -int 1
  defaults write pinning -string start
  defaults write autohide -boolean false
  # Choose whatever size you like:
  defaults write tilesize -int 20
  # Choose your personal preference, start, middle or end:
  defaults write pinning -string middle
killall Dock

See Fast User Switching/Apple Menu? for details about creating services, and assigning a keyboard shortcut to it.

Note: killall Dock also resets Dashboard (and probably Exposé, but not Spaces). If anyone knows of any other side effect then please comment! I doubt one could achieve the same by scripting System Preferences using AppleScript, as that does not seem to support very small sizes, nor supports moving the Dock into a corner:

tell application "System Events"
  tell dock preferences
    -- no matter how small the number is: won't help
    set dock size to 0.0000000001
    -- screen edge: left, bottom, right
    set screen edge to bottom
    set autohide to true
  end tell
end tell

Strangely enough, when not using killall Dock, but instead having the Bash script be followed by some AppleScript to change screen edge, my OS X often applies the new value for tilesize on the fly. But it's a bit too inconsistent for my liking.

As an aside some other settings that might hide the Dock even better:

defaults write launchanim -bool false
defaults write magnification -bool false
defaults write mineffect -string scale
defaults write orientation -string bottom
share|improve this answer

Use Dock Gone 1.0.3 (US$ 14.95).

Dock Gone keeps the Dock out of your way until you specifically ask for it. Press its hot key to make the dock disappear and reappear:

While you can always hide the Dock without Dock Gone, it will [then] reappear whenever you mouse over the edge of the screen, blocking whatever is below the cursor. And you can be sure it will happen at the worst possible time. Dock Gone prevents this by moving the Dock completely out of your way, effectively turning it off until you ask for it back.

You may assign it the default keyboard shortcut.

share|improve this answer
He specifically states in the question he doesn't want to hide it, just disable the mouse trigger... – JNK Sep 11 '10 at 11:40
@JNK it does the same as he wanted it will toggle show/hide when hot-key is pressed. The only think that dosnt match is that the mouse trigger activates with the as the dock activates.But this shoudnt be a problem as he uses hot-key – subanki Sep 11 '10 at 11:51
He specifically wants the mouse function disabled. – JNK Sep 11 '10 at 11:58
@Beano Tell me if you are satisfied with this program if not then I will update or delete this answer – subanki Sep 11 '10 at 11:59
I have now tried Dock Gone but wasn't impressed enough to pay for it. It works ok in default operation and there was an option to enable a 'safe mode' so it wouldn't conflict with other OSX apps but then the compromise is you get a small white bar in one of the bottom corners of the screen when your mouse touches the bottom edge. It does work well but its not for me. I have been looking into a way of increasing the amount of time the mouse is required to touch the edge of the screen for the dock to appear as I think this could be a good workaround but have not found anything so far – Beano Sep 11 '10 at 17:34

I just want to point out that there is a trick to achieve what you want. Type this in the terminal:

Mountain Lion and newer

This may work on snow leopard but I haven't tested on it.

defaults write autohide-delay -float 100 && killall Dock

setting the float to 100 means you can control the delay time (in seconds) for when hovering will activate the dock. It should be quite difficult to accidentally show the hidden dock with 100 seconds delay.

To reset back to defaults just do this command:

defaults delete autohide-delay; killall Dock

share|improve this answer

You must log in to answer this question.

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