Making hidden applications look hidden in the Dock

When you hide an application with C-H, the Dock can show that the application's hidden by decreasing the alpha value of the application's dock icon. I'd forgotten this isn't how Mac OS ships, but it isn't, and not having it has been annoying me for the last couple of weeks. I've finally got round to digging out what you have to do. Simply run:

defaults write com.apple.Dock showhidden -bool true

You need to kill Dock to see any change.

Interestingly, any Java application that was using -Xdock:icon to get a dock icon will come back with the wrong icon; some kind of variant of the Terminal icon. Turning magnification on shows that the word in tiny green text reads "exec".

How very l33t.