Add ability to pin trash bin to dock

Bug #1058468 reported by Clara
64
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Plank
Fix Released
Wishlist
Rico Tzschichholz

Bug Description

The question describe what I want to do, to add the trash bin to the plank dock, but is it possible?, and how to?

Thanks

Related branches

Revision history for this message
Clara (claracagigal) wrote :

I would like to add the trash bin icon to the plank dock through the settings or other simple configuration way.

Thank you vey much.

Robert Dyer (psybers)
summary: - Feature required: Add tras bin to palnk dock
+ Add ability to pin trash bin to dock
Changed in plank:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → Robert Dyer (psybers)
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

This is a docky feature which is already implemented in a docklet.
@robert: So I am wondering why you want to do something about that in plank?

Revision history for this message
Robert Dyer (psybers) wrote :

Sorry, forgot to attach the patch.

@Rico: the issue here is, we use File.new_for_path when we could easily use File.new_for_uri. With this small change, you can then put a uri of 'trash://' and add a trash stack to your dock.

Revision history for this message
Robert Dyer (psybers) wrote :
Revision history for this message
Robert Dyer (psybers) wrote :

Note that this does not give similar functionality as the Trash docklet in Docky. It literally just acts like any other folder on your dock.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

@robert: if you really want to introduce this then this currently breaks everything without further changes. File.new_for_uri fails silently for simple path arguments without an uri-type.

Revision history for this message
Robert Dyer (psybers) wrote :

If you refer to the fact launchers would need updated to prepend 'file://' to their paths, I am aware of this.

Revision history for this message
Clara (claracagigal) wrote :

Thanks for the patch.

 How do I apply?, simply I run it in a xterm ? or I do need to make other operations?.

Revision history for this message
Robert Dyer (psybers) wrote :

@Rico: also, we could look at the launcher path and if it has no protocol listed, assume 'file://' which should provide backwards compatibility.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

@Robert: Feel free to prepare a patch which does that.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

@Robert: any news on that?

Revision history for this message
Robert Dyer (psybers) wrote :

Well to be honest, that patch doesn't even seem to work for me now. I think too many things have changed in trunk since I wrote that.

Changed in plank:
status: In Progress → Fix Committed
assignee: Robert Dyer (psybers) → Rico Tzschichholz (ricotz)
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Now with this marked fixed, how do I do it exactly?

Revision history for this message
Robert Dyer (psybers) wrote :

Manually create a new .dockitem:

rdyer@narmada:~/.config/plank/dock1/launchers$ cat trash.dockitem
[PlankItemsDockItemPreferences]
Launcher=trash://

Note that Plank simply treats this as a folder. You will get a trash icon and right click will contain the trash contents. But you can't drag files to it. You can't empty it.

Changed in plank:
status: Fix Committed → Fix Released
Revision history for this message
quequotion (quequotion) wrote :

I have a better idea:

Here's a desktop file (/usr/share/applications/trashcan.desktop):
http://pastebin.com/YbKcrw3F

And a dockitem:
http://pastebin.com/8PjYaLNG

And some bash magic to make it really work (rewrite in vala?):
http://pastebin.com/esgaJXmB

The icon will function as a drop target for files and folders, but open the trash directory when clicked.

It also features an "Empty Trash" right-click option.

The only thing I couldn't figure out was how to switch the icon when there is trash.

Revision history for this message
quequotion (quequotion) wrote :

Unfortunately, even if the the icon is changed in the desktop file, plank does not update the icon displayed.

Revision history for this message
Panagiotis Tabakis (tabakisp) wrote :

Running Plank 0.10.0.1392 on Xubuntu 14.04 32bit still no proper fix released.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.