Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Oct 2014, 13:04
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Trash for Ice
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Author Message
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Fri 01 Jul 2005, 19:50    Post_subject:  Trash for Ice  

I don't know if anybody would be interested, but here is a little script that I wrote for Ice, that creates a "Trash" can on the desktop. It could easily be made to work in other window managers though. It is manual intallation only at the time. I got the trash icons from Knoppix. Here is a screen shot of how it looks.

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.


EDIT File removed. Download final copy here

Edited_times_total
Back to top
View user's profile Send_private_message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Fri 01 Jul 2005, 20:59    Post_subject:  

clever.
is there really a need for both a png and an xpm icon?

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send_private_message 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Fri 01 Jul 2005, 21:04    Post_subject:  

The .xpm is 16X16 and is for the Ice Quick Launch Menu. The .png is for the desktop icon and is 48X48.
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Fri 01 Jul 2005, 21:21    Post_subject:  

the png might work in the menu too ... icewm can display pngs's and will automatically resize them too
Back to top
View user's profile Send_private_message 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Fri 01 Jul 2005, 21:45    Post_subject:  

GuestToo wrote:
the png might work in the menu too ... icewm can display pngs's and will automatically resize them too


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.
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sat 02 Jul 2005, 00:15    Post_subject:  

dvw86 wrote:
GuestToo wrote:
the png might work in the menu too ... icewm can display pngs's and will automatically resize them too


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.


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)

Is this mounting, compressing and uncompressing? Why is it slow? Can it be speeded up or tell me it is doing it?

Smile
thanks again

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Sat 02 Jul 2005, 01:01    Post_subject:  

It is not slow on my system. It is pretty instantaneous, although Rox doesn't update until after you mouse over the Rox window. It's just a simple script (my first shell script btw). It just checks to see if you have included a file or directory when activating the script. If there is a file or directory it moves it to the trash. If no file or directory it simply opens up the trash file in Rox.

Code:

#!/bin/sh
test -sd "$@"
if [ "$?" = "0" ]
then
exec rox /root/.Trash
else mv "$@" /root/.Trash/
fi


The empty trash script just deletes everything in the trash directory.
Code:

#!/bin/sh
rm -r /root/.Trash/*
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Sat 02 Jul 2005, 01:02    Post_subject:  

you can add paths that icewm searches for icons, in the preferences file ... so you don't need to include the path to the icon

if the icon is an xpm, you do not need to include .xpm ... if it's a png, you need to include the .png

you can put icons in /root/.icewm/icons/ if you like
Back to top
View user's profile Send_private_message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Sat 02 Jul 2005, 02:15    Post_subject:  

If that's OK with you, I will add this to my IceWM Unleashed, making some of the tweaks that GuestToo suggested.
_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send_private_message 
flamesage


Joined: 01 Jul 2005
Posts: 214

PostPosted: Sat 02 Jul 2005, 02:36    Post_subject:  

Could there be a way we could DRAG it onto a recycle bin icon in the taskbar?
Or mabe when you right click it you could automaticly tell it "Send to Trash"
Back to top
View user's profile Send_private_message 
papaschtroumpf


Joined: 17 Jun 2005
Posts: 250

PostPosted: Sat 02 Jul 2005, 03:09    Post_subject:  

Have you even tried it? grab a file from rox-filer and drag it onto the icon and it goes to the trash, just like you'd expect.

SendTo is not working for me yet but it should work, I must have screwed up somewhere. (EDIT: I had and it now works)

Anyone knows of a clever way that you could get the "empty trahscan" choice if you right click on the trashcan rather than use the quicklaunch?

By the way, I did verify that if you put the png icon in the icewm path, and specify the png extension in the quicklaunch menu (the toolbar file), it gets dispayed properly and gets resized. Minor savins, but everything counts.

As part of adding this to an unleashed, 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

_________________
Mandriva LE 2005 user and puppy newbie
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Sat 02 Jul 2005, 03:37    Post_subject:  

it's trivially easy to add Empty Trash to the context menu of the trash icon, if you make it a roxapp

the roxapp will have the icon in it too

you can run a roxapp from a menu, and link to the icon inside it (or the icon inside it can be a symlink if you like)

see my aterm dotpup (or aumix or eboard or mplayer or xmms) to see how to add context menus to a roxapp (right click the icon and click Look Inside ... the context menu is in AppInfo.xml ) ... and read the rox docs
Back to top
View user's profile Send_private_message 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Sat 02 Jul 2005, 20:10    Post_subject:  

Great ideas. I'll work on a context menu for the trash can.

Quote:
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

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.
Back to top
View user's profile Send_private_message 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Sun 03 Jul 2005, 02:15    Post_subject:  

Ok, here it is. This is a Rox App version of Trash. I did not include the IceWM Quick Launch Menu or the empty-trash script since you can now right click on the trash icon and select "Empty the Trash". Just unzip it, put it where you want, and drag it to your desktop. I will also make a zip file of the icons and the empty-trash script for those who may want them. Only one icon is included and it sets itself. Thanks to GuestToo for his words of wisdom.
EDIT You will also need to create /root/.Trash if you do not already have it.

EDIT #2 File removed. Download final copy here

Edited_times_total
Back to top
View user's profile Send_private_message 
dvw86


Joined: 04 May 2005
Posts: 636
Location: Washington State

PostPosted: Sun 03 Jul 2005, 02:57    Post_subject:  

This is basically the things I took out of the first zip file. You can use them to make an "Empty the Trash" item in the Quick Launch Menu if you do not already have it.
trash-extras.zip
Description  Extra script and icons for the Trash Application.
zip

 Download 
Filename  trash-extras.zip 
Filesize  5.26 KB 
Downloaded  907 Time(s) 
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 3 Posts_count   Goto page: 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0845s ][ Queries: 13 (0.0081s) ][ GZIP on ]