Funny, I have used all 3 of the answers so far ;)
Here's another option: use applescript. You can create applescripts that open a window in the current finder directory for example.
I have a bunch of applescripts like that and I tied them to hotkeys with Quicksilver (or butler)
by default, I use a hotkeys that opens a terminal in the current finder directory, but only if finder is the frontmost application. Otherwise I simply get a fresh window.
Then I also have scripts that open ssh sessions to certain servers and reconnect to a screen session. With the -x option to screen, you can have multiple erminal windows lookng at the same server terminal, great :)
EDIT:
This is the script I wrote which opens a new window, going into the current Finder directory if Finder is the currently active application:
on run
-- Figure out if we want to do the cd (doIt)
-- Figure out what the path is and quote it (myPath)
try
tell application "Finder" to set doIt to frontmost
set myPath to finder_path()
if myPath is equal to "" then
set doIt to false
else
set myPath to quote_for_bash(myPath)
end if
on error
set doIt to false
end try
-- Figure out if we need to open a window
-- If Terminal was not running, one will be opened automatically
tell application "System Events" to set isRunning to (exists process "Terminal")
tell application "Terminal"
-- Open a new window
if isRunning then do script ""
activate
-- cd to the path
if doIt then
-- We need to delay, terminal ignores the second do script otherwise
delay 0.3
do script "cd " & myPath in front window
end if
end tell
end run
on finder_path()
try
tell application "Finder" to set the source_folder to (folder of the front window) as alias
set thePath to (POSIX path of the source_folder as string)
on error -- no open folder windows
set thePath to ""
end try
return thePath
end finder_path
-- This simply quotes all occurrences of ' and puts the whole thing between 's
on quote_for_bash(theString)
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to "'"
set the parsedList to every text item of theString
set AppleScript's text item delimiters to "'\\''"
set theString to the parsedList as string
set AppleScript's text item delimiters to oldDelims
return "'" & theString & "'"
end quote_for_bash
To use it, open Script Editor and paste it in. Then save it somewhere convenient (I use ~/Library/Scripts) and tell QuickSilver, Butler or Google Quick Search Bar to run it. With QS and Butler you can set global shortcut keys as well.
Hope this helps,
Wout.