Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A compilation of hidden dock menu additions Desktop
I was poking around in the Dock Package recently when I came upon DockMenu.plist. This file has been mentioned before in Add Hide and Hide Others to dock menus, Two ways to pin your 10.1 dock, and a really old hint called Move and Corner your Dock. However, there seem to be slight variations in the syntax used in this file through the different OS versions, so I thought it might be useful to put together an up-to-date hint with a little extra thrown in.

After lots of research and fiddling around, I have discovered many useful commands for adding options to the Dock Menus in Jaguar (I'm running 10.2.3). The command I find most useful is the ability to add "Relaunch Dock" to the Dock menu (control-click on the Dock separator), but I have also found the "Dynamic Integers" to be interesting as well (see the end of this hint for more info on that).

Here is the list of commands I have been able to figure out. There are some gaps that I couldn't solve -- maybe someone else can fill in the blanks. What got me started with all this was the search for a command to Minimize using the hidden "Suck-In" effect. Even though it can be changed in com.apple.dock.plist (or with TinkerTool), I wanted quick access to it via the Dock Menu, but I couldn't find the command. I figured it would be 1032 or somewhere around there. Regardless, here is the list:
1000 - Open (same as clicking on a file/folder/process in the Dock)
1001 - Empty Trash
1002 - Keep in Dock (available only if the process isn't already kept in the Dock)
1003 - Quit
1004
1005 - Show in Finder
1006 - Hide
1007 - Hide Others
1008 - Bring All to Front (same as clicking on an icon in the Dock)
1009 - Turn Hiding ON
1010 - Turn Hiding OFF
1011 - Turn Magnification ON
1012 - Turn Magnification OFF
1013 - Position on Screen (submenu)
1014 - Pinning (submenu)
1015 - Open Dock Preferences...
1016 - Position at TOP
1017 - Position at BOTTOM
1018 - Position at LEFT
1019 - Position at RIGHT
1020 - Pin at START
1021 - Pin at MIDDLE
1022 - Pin at END
1023
1024 - Relaunch / Force Quit (works for processes, not the Dock)
1025 - Relaunch Dock (works for the Dock, not for processes)
1026
1027 - Pin at START (an odd extra)
1028 - Pin at END (another odd extra)
1029 - Minimize Using (submenu)
1030 - Minimize Using GENIE
1031 - Minimize Using SCALE
1032
2000 - SEPARATOR
2001 - "No Windows" (for the Finder when no windows are open)
2002 - "Finder Not Running" / "Application Not Responding" / "URL"
2003 - Minimized Window (the name of the minimized window is inserted)
2004 - Close
Here's how to start making changes to your Dock Menus. Although it seems harmless to change this file, I recommend saving a copy before making any changes. The worst that happened to me was simply having no menus appear due to a simple typo. Navigate to /System -> Library -> CoreServices -> Dock -> Contents -> Resources -> [your language].lproj -> DockMenus.plist.

Open DockMenus.plist in your preferred editor. Notice that there are nine main key elements throughout the file (volumes are treated as folders):
<key>dock</key>
...
<key>file</key>
...
<key>finder-quit</key>
...
<key>finder-running</key>
...
<key>folder</key>
...
<key>minwindow</key>
...
<key>process</key>
...
<key>trash</key>
...
<key>url</key>
Each one defines a set of commands available when you either control-click or click and hold on a particular kind of file in the Dock. The items in the "dock" key element are accessible when you control-click on the separator in the Dock. Most of the commands are in the form:
<dict>
    <key>command</key>
    <integer>1011</integer>
    <key>name</key>
    <string>Turn Magnification On</string>
</dict>
Where the <integer> tag defines the command to be performed, and the <string> tag defines the title of the menu item as it will appear in the Dock Menus (this can be anything you like). Many of the commands will work for most of the above mentioned nine main key elements, but some, for example only apply to the "trash".

So, all you have to do is recreate one of these commands (from the opening "dict" tag to the closing "dict" tag) after the command where you want the new menu item to appear. For example, I added the indicated lines below for an option to relaunch the dock. This menu item will appear below the "Dock Preferences..." when you control-click the Dock separator.
<dict>
    <key>command</key>
    <integer>1015</integer>
    <key>name</key>
    <string>Dock PreferencesĶ</string>
</dict>
<dict>                                   <----- These
    <key>command</key>                   <-----  six
    <integer>1025</integer>              <-----   lines
    <key>name</key>                      <-----    have
    <string>Relaunch Dock</string>       <-----     been
</dict>                                  <-----      added
Another cool option is to add "Pinning" to the Dock submenu of "Dock" (as originally mentioned here).
<dict>
    <key>command</key>
    <integer>1014</integer>
    <key>name</key>
    <string>Pinning</string>
    <key>sub</key>
    <array>
        <dict>
            <key>command</key>
            <integer>1020</integer>
            <key>name</key>
            <string>Start</string>
        </dict>
        <dict>
            <key>command</key>
            <integer>1021</integer>
            <key>name</key>
            <string>Middle</string>
        </dict>
        <dict>
            <key>command</key>
            <integer>1022</integer>
            <key>name</key>
            <string>End</string>
        </dict>
    </array>
</dict>
If you felt like it, you could also add "Top" to the "Position on Screen" submenu. Look for the following lines (and add what I have indicated):
<dict>
    <key>command</key>
    <integer>1013</integer>
    <key>name</key>
    <string>Position on screen</string>
    <key>sub</key>
    <array>
        <dict>
            <key>command</key>
            <integer>1018</integer>
            <key>name</key>
            <string>Left</string>
        </dict>
        <dict>
            <key>command</key>
            <integer>1017</integer>
            <key>name</key>
            <string>Bottom</string>
        </dict>
        <dict>
            <key>command</key>
            <integer>1019</integer>
            <key>name</key>
            <string>Right</string>
        </dict>
        <dict>                            <----- These
            <key>command</key>            <-----  six
            <integer>1016</integer>       <-----   lines
            <key>name</key>               <-----    have
            <string>Top</string>          <-----     been
        </dict>                           <-----      added
    </array>
</dict>
There is no need to log out or even relaunch the Dock. I have found that changes take effect immediately.

A few more things ... notice how commands 2001-2003 are followed by an "enabled" key and a true/false tag? This simply makes the menu item "grayed-out". These are informational menu items and do not perform a task. I have found that these can be hard to read, and changing the "false" tag to a "true" tag helps.

Also, commands 1003 and 1024 are followed by a "dynamic" key and an integer. This is so two commands can occupy the same line and be toggled via a modifier key. You have all seen it when you control-click an app to get the menu where "Quit" lies at the bottom, then pressing the option key changes the command to "Force Quit". You can have any number of commands exist on the same line, as long as they each have a different "dynamic integer", and thus a different modifier invoke the command, and I think the alternate menu options need to follow the first one which has the dynamic integer in it.
Dynamic integers:
    0: -no modifier-
    1: option
    2: command
    3: option + command
    4: control
    5: control + option
    6: control + command
    7: control + option + command
    8: shift
    9: shift + option
    10: shift + command
    11: shift + option + command
    12: shift + control
    13: shift + control + option
    14: shift + control + command
    15: shift + control + option + command
For example, you could add "Quit" to the "Finder" Dock Menu, and make an alternative "Relaunch" option appear when the control key is pressed (NOTE: relaunch doesn't appear to gracefully quit Finder). Add these lines to the "finder-running" section:
<dict>
    <key>command</key>
    <integer>1003</integer>
    <key>dynamic</key>
    <integer>0</integer>
    <key>name</key>
    <string>Quit</string>
</dict>
<dict>
    <key>command</key>
    <integer>1024</integer>
    <key>dynamic</key>
    <integer>1</integer>
    <key>name</key>
    <string>Relaunch</string>
</dict>
<dict>
    <key>command</key>
    <integer>1003</integer>
    <key>dynamic</key>
    <integer>0</integer>
    <key>name</key>
    <string>Quit</string>
</dict>
<dict>
    <key>command</key>
    <integer>1024</integer>
    <key>dynamic</key>
    <integer>1</integer>
    <key>name</key>
    <string>Relaunch</string>
</dict>
NOTE: for some reason, you actually have to add these keys twice, or else it won't work.

You could also make "Hide", "Hide Others," and "Bring All to Front" reside on the same location of menus, where "Hide" is visible, and "Hide Others" and "Bring All to Front" are revealed via the option and option+command keys respectively. Place the following in the "process" section and/or the "finder" section:
<dict>
    <key>command</key>
    <integer>1006</integer>
    <key>dynamic</key>
    <integer>0</integer>
    <key>name</key>
    <string>Hide</string>
</dict>
<dict>
    <key>command</key>
    <integer>1007</integer>
    <key>dynamic</key>
    <integer>1</integer>
    <key>name</key>
    <string>Hide Others</string>
</dict>
<dict>
    <key>command</key>
    <integer>1008</integer>
    <key>dynamic</key>
    <integer>3</integer>
    <key>name</key>
    <string>Bring All to Front</string>
</dict>
[robg adds: I think this hint may well qualify as "the final word" on modifying the dock's contextual menus! Nice work, zeb!]
    •    
  • Currently 3.33 / 5
  You rated: 5 / 5 (6 votes cast)
 
[34,849 views]  

A compilation of hidden dock menu additions | 23 comments | Create New Account
Click here to return to the 'A compilation of hidden dock menu additions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A compilation of hidden dock menu additions
Authored by: cybergoober on Jun 18, '03 11:33:29AM

Nice hint!

Let the customization begin!



[ Reply to This | # ]
A compilation of hidden dock menu additions
Authored by: SirG3 on Jun 18, '03 11:35:00AM

There needs to be one for minimized windows... To close them without opening the window :(

SirG3



[ Reply to This | # ]
A compilation of hidden dock menu additions
Authored by: thalez on Jun 18, '03 01:00:15PM

I 100% agree. I would be great to close minimized windows directly form the dock.



[ Reply to This | # ]
Closing minimized windows
Authored by: zeb on Jun 18, '03 01:38:14PM
There is... This is a copy of my "minwindow" tag:
<key>minwindow</key>
<array>
    <dict>
        <key>command</key>
        <integer>2003</integer>
        <key>enabled</key>
        <true/>
        <key>name</key>
        <string>MinimizedWindow</string>
    </dict>
    <dict>
        <key>command</key>
        <integer>2000</integer>
        <key>separator</key>
        <true/>
    </dict>
    <dict>
        <key>command</key>
        <integer>2000</integer>
        <key>separator</key>
        <true/>
    </dict>
    <dict>
        <key>command</key>
        <integer>2004</integer>
        <key>name</key>
        <string>Close</string>
    </dict>
    <dict>
        <key>command</key>
        <integer>2004</integer>
        <key>name</key>
        <string>Close</string>
    </dict>
</array>
For some reason the separator and the close (2004) command need to be repeated... And as you can see, I have changed the first command (2003) to "true" which changed the menu item from gray to black (for easier reading).

[ Reply to This | # ]
Closing minimized windows
Authored by: Iceberg on Jun 18, '03 03:07:57PM

The menu item is there, but has no effect. What am I doing wrong?



[ Reply to This | # ]
Closing minimized windows
Authored by: koelling on Jun 18, '03 03:11:16PM

I too get a menu item, but no action.



[ Reply to This | # ]
Closing minimized windows
Authored by: englabenny on Jun 18, '03 03:43:19PM

It seems it only works on finder windows.



[ Reply to This | # ]
Closing minimized windows
Authored by: zeb on Jun 18, '03 04:49:00PM

oddly, this is true for me too. I can get it to work in: Finder, iTunes, BBEdit 7.0, and Amadeus II for starters (I didn't test every app). I wonder what the difference is between how these and other apps implement their own "close" commands.

---
..:: Zeb ::..

zebellis.com



[ Reply to This | # ]
Closing minimized windows (CARBON?)
Authored by: a1291762 on Jun 18, '03 06:53:47PM

If it works on those apps, perhaps it relies on carbon?



[ Reply to This | # ]
Closing minimized windows (CARBON?)
Authored by: englabenny on Jun 18, '03 08:14:34PM

That seems to be the case.. No wonder apple hasn't got this funtion into a public release then..



[ Reply to This | # ]
Closing minimized windows (CARBON?)
Authored by: djLOKI on Jun 20, '03 04:14:02PM

OK I thought I'd spent the last 2 years a little too high or something, as I could have sworn there had been a "close" option in the Developer preview relseases, and I think that Jag preview had it also.

There was also a cool "yield" traffic sign that popped over the dock icon of an unresponsive application, and now that I think of it, you could choose to minimize applications to the dock or desktop.

Hey, anybody out there got a copy of the "old" music player, about DP3 release time or so? I'd like to get my hands on it.

TIA!



[ Reply to This | # ]
RE: Music Player
Authored by: cybergoober on Jun 20, '03 05:51:34PM

I tried to copy it off of the Public Beta onto a system running Jaguar. It didn't work.



[ Reply to This | # ]
RE: Music Player
Authored by: djLOKI on Jun 27, '03 07:38:02AM

Bummer, I really liked that little player. Oh well, thanks for the reply!



[ Reply to This | # ]
Guess what's back in Black Cat!!
Authored by: djLOKI on Jun 27, '03 07:47:22AM

So I'm messing around with this 10.3 installation freshly "re"installed on my iBook 2003 Turbo SE. (Note I ended up installing twice, first time around was a trial as upgrading from 10.2.6, let's just hope that this feature is "fixed" for the final release as half my apps didn't work after the upgrade of a VERY vanilla starting point.) Installing as a new install worked fine...I degress.

Anyway, the "close" option is back in the dock contextual menu for everything I've tried so far, "Steel" finder windows and all!



[ Reply to This | # ]
User-specific changes
Authored by: benjaminpg on Jun 18, '03 12:28:14PM

Does any one know if I can modify the plist in MY user preferences folder, so it doesn't affect all users on the machine?

Thanks,
Benjamin



[ Reply to This | # ]
User-specific changes
Authored by: zeb on Jun 18, '03 01:44:26PM

I don't believe this is possible unless there were a way to have the Dock reference a file in the user's preferences folder which contains the commands instead of referencing the file burried in the System folder.



[ Reply to This | # ]
Use separate Dock apps for each user
Authored by: VRic on Jun 21, '03 03:39:14AM

This should work:

- remove Dock.app from its normal location (beware that future updates may try to update it there)
- duplicate it into each user's folder
- edit each user's Dock.app to fit their needs
- add each Dock.app to each user's login items (the mac will be angry if Dock.app doesn't launch after login, it's OK to quit it later though, and it won't relaunch automatically since it's not where it's supposed to be)



[ Reply to This | # ]
What about a dock hiding hack?
Authored by: xianman on Jun 18, '03 06:19:57PM

What I would really like to see for the dock would be the simple addition of only popping open the dock (when hiding is on of course) IF a modifier key is down, like the command key for instance. Does anyone know if that would be a possible hack?



[ Reply to This | # ]
What about a dock hiding hack?
Authored by: zeb on Jun 18, '03 06:57:59PM

There would probably need to be a separate process running in the background acting as a a deamon watching out for modifier key presses. I don't think this is possible with the DockMenu.plist. I searched everywhere to find a documented list (or lookup table) for the available commands used by the dock and what they do, but I came up empty handed. The list in the Hint is based on my own findings. There could be another command that does just what you are asking...

---
..:: Zeb ::..

zebellis.com



[ Reply to This | # ]
What about a dock hiding hack?
Authored by: cybergoober on Jun 20, '03 10:56:56AM

You mean like enabling Full Keyboard Access and using the default F-keys? Control + F3 brings up the Dock and you can Tab between all items in the Dock.

Probably not exactly what you had in mind though.



[ Reply to This | # ]
A less stupid dock
Authored by: VRic on Jun 21, '03 03:56:03AM

What you really want is a less stupid dock that would stop popping when told to hide or fleeing from the cursor whenever you try to use it. That's what A-Dock has been for years under OS 9 and below. Maybe you could replace the dock with A-Dock if you can live without Apple's advanced Dock features like magnification and docklets.

For that you'll need a trick:
- move Dock.app from its default location to the Applications folder (otherwise it will relaunch as soon as you quit it)
- add it to your login items (it needs to launch once after login)
- quit it manually or add a script applet to you login items that says:
tell app "Dock.app" to quit
- try A-Dock X
http://jerome.foucher.free.fr/ADockX.html



[ Reply to This | # ]
A less stupid dock
Authored by: bluehz on Jun 21, '03 02:16:08PM

A-Dock is very nice, tried it for the first time today. replacing my standard Dock.app with alias. Unfrotunately A-Dock seems to crash whenever I try to add anything to it using the Shift+drag method. Has anyone had any success with A-Dock?



[ Reply to This | # ]
Leopard: minimized window name
Authored by: S on Mar 02, '08 03:37:07PM
The name for minimized windows on Leopard can be shown like this:

		<dict>
			<key>command</key>
			<integer>2003</integer>
			<key>enabled</key>
			<false/>
			<key>name</key>
			<string>%@</string>
		</dict>


[ Reply to This | # ]