This behaviour happens beacuse the dock just launches an app. Finder is classified as an app, so it will open/show the app window, you will need to open a new window within the app.
You can use the keyboard short cut CMD + N, and if you are not in the app press CMD + Tab to open it first.
You could possibly try using Quicksilver, which makes custom keystrokes, so you could assign O to opening a new finder window
You can kludge something together with some AppleScript and some clever icon image pasting. Here's how you'd do it for iTerm/iTerm2.
Open the AppleScript Editor and paste in the following AppleScript:
set myapp to "iTerm"
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
if appIsRunning(myapp) then
# What you do here will depend on the program. This works for
# iTerm but you'll need to look up the actions for other programs
# since this bit is iTerm-specific.
tell application "iTerm"
set myterm to (make new terminal)
tell myterm
launch session "Default"
end tell
end tell
else
tell application myapp
activate
end tell
end if
You can use the Run button in the editor to test that it works. If you want a different profile opened change "Default" on line 12 to the name of the profile you want opened.
Now save this AppleScript. In the Save dialog under "File Format" at the bottom select "Application" from the list.
I saved mine as "New iTerm.app" to my Desktop.
Now every time I click on "New iTerm.app" on my Desktop I get a new iTerm window. I can drag "New iTerm.app" to my Dock and it'll be a Dock icon I can click on any time I want to get a new iTerm window open. But the icon is the generic AppleScript icon.
Let's change it to the iTerm icon. Select "New iTerm.app" on the Desktop and click Cmd-I to bring up the properties screen for the application.
Now navigate to /Applications
in a Finder window, find iTerm in the list of installed applications, select it and click Cmd-I to open the properties screen for the iTerm application.
Click the icon in the iTerm info window so it gets a soft blue shadow around it. Press Cmd-C to copy the icon to the clipboard.
Now click the icon in the "New iTerm.app" info window and press Cmd-V to paste the iTerm icon on to the "New iTerm.app" application.
It should now have an iTerm icon.
You can move the "New iTerm.app" to your /Applications
folder if you like. Drag it from the folder you decide to keep it in, back to your dock, and you can now click on it in the Dock to open up a new iTerm window with every click.
If you wanted to be able to distinguish it from the running iTerm.app Dock icon you could consider pasting the icon in to an image editor like Pixelmator and adding a big red +
to it so it's clearly identified as the icon to press for a new iTerm window instead of the icon to press to see the exiting, open iTerm application.
Here are some more scripts for some other applications to get you started customizing things:
Google Chrome (New Window)
set myapp to "Google Chrome"
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
if appIsRunning(myapp) then
tell application "Google Chrome"
make new window
end tell
else
tell application myapp
activate
end tell
end if
Google Chrome (New Tab)
set myapp to "Google Chrome"
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
if appIsRunning(myapp) then
tell application "Google Chrome"
make new tab at end of tabs of window 1
end tell
else
tell application myapp
activate
end tell
end if
Sublime Text 2
Unfortunately ST2 doesn't seem to have an AppleScript accessible extensions. You can always take a look at the OS X command line tool that ST2 ships with. You can call that from a simple script in the Dock to open a new window in ST2. So:
set myapp to "Sublime Text 2"
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
if appIsRunning(myapp) then
# Assumes you've installed the subl command line tool for ST2
# in to /usr/local/bin. Adjust accordingly.
do shell script "/usr/local/bin/subl --new-window"
else
tell application myapp
activate
end tell
end if
Best Answer
What about when creating a new user? Does that work over there or has it the same behavior?
If it DOES work on the new user, I would try this is in order inside the problem account:
It is (hopefully) unnecessary to mention that you want to create a backup of your machine first before trying the following steps, but I still felt the urge to do so.
~/Library/Caches/*.*
)Until their respective preference files are back in, I would recommend not to open those applications (especially Mail) as this may have side-effects on your applications' settings and sometimes content becoming inaccessible (or more difficult to reach/get back).
The reasoning behind number 3 is that some preferences may not be viewed as the obvious origin, but still may have caused that. Removing them all and then putting them back one-by-one (or 5 at a time) makes sure that you can identify which file this has actually caused.
In the event that a newly created user has the same behavior (only then), you can try to install the latest combo update or re-install Mac OS X (no erase, just installing over the existing installation) to repair/re-add corrupted/missing files.