EDIT
In the README file I forgot to mention that you need to create a symlink of /root/my-applications/bin/empty-trash and place it in /usr/local/bin
I fixed it.
![Image](http://vanwormerfamily.com/usb-linux/puppy/trash-screen-shot.png)
EDIT File removed. Download final copy here
I did miss having a bin - so now I have one - good stuff. I notice that Puppy or is it Linux takes several seconds to delete files (applies to copying aswell)dvw86 wrote:That would be great since I have a bunch of png's that I want to use in the Ice menu. I'll give it a try.GuestToo wrote:the png might work in the menu too ... icewm can display pngs's and will automatically resize them too
Code: Select all
#!/bin/sh
test -sd "$@"
if [ "$?" = "0" ]
then
exec rox /root/.Trash
else mv "$@" /root/.Trash/
fi
Code: Select all
#!/bin/sh
rm -r /root/.Trash/*
I was trying to keep as much of it in root as possible so it will not get deleted with Puppy upgrades, but you can stick things in any directory that you want. I'm glad that some one finds it useful.I think the following paths make sense:
scripts in /usr/X11R6/bin
png icon in /usr/local/share/icewm/icons
modify toolabr file in /usr/local/share/icewm/toolbar
ln -s /usr/X11R6/bin/empty-trash /usr/local/bin/empty-trash
ln -s /usr/X11R6/bin/Trash /root/Choices/SendTo/Trash
Thanks, I'll add that to it. How would I go about changing the icons based on the contents of root/.Trash? My first thought is that I would I check for the size of the directory and anything over 0 bytes be considered full. I don't know how I would then set the icon though.GuestToo wrote:this line in AppRun will create /root/.Trash if it doesn't exist:
[ -d /root/.Trash ] || mkdir /root/.Trash
changing the trash icon (full, empty) is easy ... getting rox to show the changed icon, rather than a cached version of the old icon, is harder
Code: Select all
#!/bin/sh
# July 2, 2005 - Dan Van Wormer - Puppy Linux
[ -d /root/.Trash ] || mkdir /root/.Trash
test -sd "$@"
if [ "$?" = "0" ]
then
exec rox /root/.Trash
else mv "$@" /root/.Trash/
cp /root/my-applications/bin/Trash/trashcan_full.png /root/my-applications/bin/Trash/.DirIcon
fi
if [ "$1" = "-empty" ]
then
rm -r /root/.Trash/*
cp /root/my-applications/bin/Trash/trashcan_empty.png /root/my-applications/bin/Trash/.DirIcon
fi