How can I add Trash icon to the sidebar in Mac OS X Lion?

How can I add the Trash icon and empty Trash from the sidebar of Finder.app in Mac OS X Lion ?

I dont have a problem to add them in the list of favorites too, but the Trash icon is not draggable.

-
Good question, can you confirm which OS level you are using tho? –  stuffe Aug 17 '11 at 13:40
@stuffe I am using Lion. I will update the question itself to avoid confusion –  Sairam Aug 17 '11 at 13:42

First, open the trash can by clicking on it in the Dock.
In the Finder, press Command-shift-G (go to folder) and go to ~/.Trash
In the Finder window for .Trash, click the proxy icon in the title bar of the window and drag it to the sidebar.
You then have a trash folder in your sidebar.

To empty the trash from the sidebar, open Automator and create an application. As the sole action in the application, select "Run AppleScript" and use this AppleScript:

on run {}
tell application "Finder"
empty the trash
end tell
end run


Save the application as "Empty Trash", and drag it to the sidebar.

-
The answer is great, but is it possible I could customize it to get something like an eject button when external disks are mounted in order to empty the trash ? –  Sairam Aug 17 '11 at 16:32
You could Go to Folder "/System/Library/CoreServices/Menu Extras/Eject.menu/Contents/Resources", open the file "Eject.pdf", Go to File, Export, and save it to the desktop as a png file. Open the PNG in Preview, Command-A , Command C. Then select the Empty Trash application, Get Info, highlight the icon in the upper left, and paste the eject image to change the icon to an eject symbol. Then re-drag the eject application to the sidebar. –  Daniel Lawson Aug 17 '11 at 16:41
Thanks for the awesome tip automator rocks as I have used it for so many missing features. Another tip as well is to drag the application icon to the Finder toolbar. This way it is at the top, and it keeps it's icon. –  Nick Jul 26 '12 at 13:48
I couldn't figure out what was meant by "proxy icon" above, but figured I could see the Trash folder if I switched to column view as this allowed me to see the parent folder including the hidden trash folder. I could then drag this to the sidebar and voila. –  dunxd Apr 25 '14 at 23:10
@dunxd In the title bar of a Finder window, next to the name of the folder, there is a small image of the folder's icon (this is not limited to the Finder; in many programs, you find a similar icon in the title bar of the window that refers to the file the window represents). This is the proxy icon. Dragging the proxy icon has the same effect of finding the icon for the folder (or file) in the Finder and dragging it somewhere. –  Daniel Lawson Apr 27 '14 at 5:37