[Thunar-dev] Trash script

Broeisi Rast broeisito at gmail.com
Mon Feb 20 23:06:44 CET 2006


Better some Trash than no Trash at all.....


On 2/20/06, Stefan Stuhr <thunardevlist at sstuhr.dk> wrote:
>
> Thunar doesn't have a trash like other file managers, and it doesn't
> seem like it will get one in time for Thunar 1.0 (I do hope that I'm
> wrong here). As I want to have a trash in my filemanager, I have
> developed a simple trash script - simpletrash.sh (shell script with
> embedded python code; attached to this mail) - with nice PyGTK dialogs,
> that can be used to move files to a trash folder.
>
> The script move files to ~/.Trash/ (which seems to be the same method
> Nautilus uses) and append a number to the end of the filename (before
> the extension) when there are name conflicts (e.g. file.txt >
> file-2.txt). It uses the mv command, as that seems to work better than
> the Python shutil.move method.
>
> If one runs the script without arguments, ~/.Trash/ will be opened in
> Thunar. Otherwise, the arguments are the files that one wants to move to
> the trash.
>
> The following suggestions expect the script to have the filename
> simpletrash.sh, be executable, and in a directory in $PATH.
>
> Suggestions for integration with Xfce and Thunar:
>       * Add a launcher to a panel with the script as command. You can
>         then drag-drop files from Thunar to the launcher to move them to
>         the trash. If you click on the launcher, ~/.Trash/ will be
>         opened in Thunar.
>       * Give ~/.Trash/ a nice trash emblem in Thunar.
>       * Add ~/.Trash/ to the shortcuts pane in Thunar and rename the
>         shortcut to Trash (or what you want your trash folder to be
>         called).
>       * Add a custom action in Thunar with (but without quotes) Name:
>         "Move to _Trash" and Command: "simpletrash.sh %F". Check all
>         check boxes on the Appearance Conditions tab.
>       * If and when Xfdesktop will get support for drag-dropping of
>         files onto .desktop files as in Thunar (which executes
>         the .desktop file's Exec with the dropped files as arguments),
>         you can put the attached trash.desktop file in ~/Desktop/ and
>         drop files onto it to move them to the trash.
>
> Be aware that this script only supports ~/.Trash/ as trash folder, and
> that files from other filesystems - removable media included - will be
> moved to ~/.Trash/ if you uses this script with them as arguments. You
> may not want to do that.
>
> There is some (as in three) configuration options for the script, in the
> top of the script after the GPL notice. One can configure the script not
> to show the confirmation dialog or the error dialog.
>
> Use this script at your own risk - any damage caused by this script
> isn't in any way intentional.
>
> Stefan
>
>
> _______________________________________________
> Thunar-dev mailing list
> Thunar-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/thunar-dev
>
>
>
>


--
The future belongs to those who believe in the beauty of their dreams.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20060220/6d0a1519/attachment.html>


More information about the Thunar-dev mailing list