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.
![text](../../I/static/images/4d4286003cc8c8938da46c87b563d3ea1811a414fd06ff871c2ea66fa43d7ec1.png)
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
He specifically states in the question he doesn't want to hide it, just disable the mouse trigger... – JNK – 2010-09-11T11:40:01.650
@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 – 2010-09-11T11:51:10.207
He specifically wants the mouse function disabled. – JNK – 2010-09-11T11:58:15.743
@Beano Tell me if you are satisfied with this program if not then I will update or delete this answer – subanki – 2010-09-11T11:59:01.013
@JNK, but that's exactly what this (expensive) application does, isn't it? – Arjan – 2010-09-11T12:43:17.040
@subanki and @arlen Thankyou for your answers and sorry for not replying more promptly. I think I will trial Dockgone..some reviews I have read have reported that there were bugs relating to widgets and dashboard, as well as reports that it is not truly hidden but shrunk to a very small size, but I guess I need to see for myself – Beano – 2010-09-11T13:28:51.890
(@Beano, funny how I did get to be @arlen ;-) Just for your information: only the first @Name is notified, while the author of the post you're commenting on is always notified. Hence, as for notifications, using
– Arjan – 2010-09-11T13:32:01.790@Arjan and @subanki
would have been better. Cheers!)@Arjan :) my apologies for getting your name wrong and thankyou for the info – Beano – 2010-09-11T13:35:56.757
@Beano, no problem. Don't forget to tell us about Dock Gone once you've tried it! – Arjan – 2010-09-11T14:06:25.600
1I 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 – 2010-09-11T17:34:36.397
@Beano, I guess that small white bar is a very tiny Dock (just like Bryan's (free) solution from How to remove the Dock in Mac OS X Leopard, which I turned into an OS X Service -- which doesn't help you then either). Maybe accepting before trying was a bit too optimistic? Note that you can "unaccept" the accepted answer by clicking the green checkmark icon. That might tell folks that you're still looking for a better solution.
– Arjan – 2010-09-11T17:40:22.563