If you have been using Macs for a while, you may have noticed in 10.5 Apple introduced a new feature called Stacks. Stacks are shortcuts to the contents of folders right on your dock. Here is a Terminal trick that will allow you to create a stack that will show the most recently used applications. All you need to do is open up the Terminal application and enter the following:

defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

After that you should see a new line appear, enter:

killall Dock

This will restart the dock, and you will see a Stack called “recent applications.”