I've been doing like this:
- Open workflow and choose to create a new application
- In the first step use Get Specified Finder Items
- In the second step use Run AppleScript
Put this code inside:
on run {input, parameters}
if (input as string) ends with ":" then
if (list disks) contains (((input as string)'s characters 1 thru -2) as string) then
try
tell application "Finder"
eject input
end tell
end try
else
try
tell application "Finder"
move input to the trash
end tell
end try
end if
else
try
tell application "Finder"
move input to the trash
end tell
end try
end if
return 1
end run
And that's it!
Save as an application in your desktop. You can change the icon to resemble the trash.
It is not perfect, though. The icon will not change when the bin is full or empty and there are no context menu options as well. But it is free and works fine for deleting files and unmounting disks.
I am thinking about researching a way of doing this fully operational, but maybe in the near future...