How can I add Trash icon to the sidebar in Mac OS X Lion?
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.
According to this article, each partition has its own trash folder, so dragging one to the sidebar is not a global trash. This script is:
on open
tell the application "Finder"
move the selection to the trash
end tell
end open
Save the script as an application, give it an icon, and drag it into the sidebar.
I think that looks dangerous, though; what if you simply want to see the trash content while having a file selected? This answer looks safe:
on open input
repeat with i in input
tell application "Finder" to move i to the trash
end repeat
end open
on run
tell application "Finder" to open trash
end run
If you have iCloud enabled you may need to tweak the path offered by Daniel to
~/Library/Mobile\ Documents/com~apple~CloudDocs/.Trash