In Mac OS X 10.6, is there a way to disable the trigger that shows the dock when the mouse is at the edge of screen?
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.
Solution 1:
From How to remove the Dock in Mac OS X Leopard:
defaults write com.apple.dock tilesize -int 1 defaults write com.apple.dock 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 com.apple.dock tilesize -int 20 defaults write com.apple.dock 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 com.apple.dock tilesize)" if [ "$tileSize" -ne 1 ] then # Make the Dock autohide, as small as possible, and # move it into a corner defaults write com.apple.dock autohide -boolean true defaults write com.apple.dock tilesize -int 1 defaults write com.apple.dock pinning -string start else defaults write com.apple.dock autohide -boolean false # Choose whatever size you like: defaults write com.apple.dock tilesize -int 20 # Choose your personal preference, start, middle or end: defaults write com.apple.dock pinning -string middle fi 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 com.apple.dock launchanim -bool false defaults write com.apple.dock magnification -bool false defaults write com.apple.dock mineffect -string scale defaults write com.apple.dock orientation -string bottom
Solution 2:
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.