Trashcan application for ROX-Filer
Diego Zamboni, zamboni@purdue.edu.

I got the idea from Ethan's code kitchen
(http://www.cs.columbia.edu/~etgold/software/mycode.html), which has a
trashcan application written in Tcl for use with dfm. Since I don't
speak much Tcl and I wanted to add some features, I rewrote it in
Perl.

This is an application that modifies its directory to change its icon
(depending on whether there are files on the trashcan or not). So if
the program is installed in a system-wide location, you first need to
make your own local copy.

Features:

- Icon changes depending on whether there are files on the trashcan.
- If you have the latest version of ROX-Filer, which supports AppMenus
  (application-specific menus), you can right-click on the trashcan to 
  empty or open it.
- If you drop multiple items with the same name into the trashcan,
  they get automatically renamed to have extensions .1, .2, etc (like
  in a Mac).
- Uses the -x flag to automatically update windows and icons.

To install:

- Make your own copy of the application directory. For example, I have 
  mine in $HOME/local/ROX-Filer/Applications/Trashcan/

- IMPORTANT: If your ROX-Filer does not support the -x flag (get the
  latest version from CVS), set $RoxUpdate to 0 in the configuration
  section of AppRun. Or update to the latest version :-)

- IMPORTANT: If your ROX-Filer does not support AppMenus (get the
  latest version from CVS), set $UseEmptyProgram to 1 in the
  configuration section of AppRun. This will make it generate an
  "Empty trashcan" script in the trashcan directory whenever it is not 
  empty, so you can just open the trashcan and click on that program
  to empty it.

- Modify the path of the trashcan directory in AppRun if you want. By
  default it is $AppDir/Trashcan/, where $AppDir is the directory of
  the application, and it will be created automatically the first time
  you run the program. I personally prefer $HOME/.trashcan/

- Drag the Trashcan application to the pinboard or a panel (this is
  optional, but it makes the trashcan easily accessible).

- That's it. Things you drag into the trashcan will be moved to the
  trashcan directory, and the trashcan icon will change into a full
  trash (if you don't have the -x option, the icon won't actually
  update until you move the cursor over it). If you click on the
  trashcan, it will open the trashcan directory. When there are files
  in the trashcan, there will also be a program called "Empty trash"
  that you can run to empty the trash and reset the icon to the empty
  trashcan.

- If you want to change the icons used by the application, replace
  AppIconEmpty.xpm and AppIconFull.xpm in the Application directory,
  or just modify the values in the %TrashIcons hash (in the
  configuration section of AppRun) to point to the appropriate names.

- There is an experimental feature that makes the trashcan icon blink
  between two different images while a long operation is taking place
  (whether moving files to the trashcan or emptying it). To enable
  this feature, set $BlinkTrashcan to 1 in the configuration section
  of AppRun.

TODO:

- Add the capability found in dfm-trashcan.tcl of unmounting things
  when they are dragged to the trashcan.


If you enjoy this program, or have any comments or suggestions, please 
send me email to zamboni@purdue.edu.
