How does plank order non-pinned applications?

Asked by bwat47 on 2012-11-18

I'm using the latest plank from the dev ppa in linux mint 14 with cinnamon. One thing that puzzles me about plank's behavior, is where non-pinned apps appear on the dock, it seems kind of random. Lets have an example dock: Nemo pinned to the far left, chrome next to it, pidgin next to chrome, and 5 misc pinned items to the right of chrome. All non-pinned applications open to the right of nemo. If I unpin nemo to the dock then they always open to the right of pidgin. Other times they just open on some totally random place on the dock. I haven't really noticed any rhyme to how this works? With other docks they generally just open to the right of the pinned apps.

Question information

English Edit question
Plank Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

This question was reopened

Robert Dyer (psybers) said : #1

Well I can't speak for certain as to why it behaves the way it does for you, but the general algorithm is to put all non-pinned items onto the right side of the dock.

The *way* it does this is, if you edit each dock item's file (~/.config/plank/dock1/launchers/*.dockitem) you will see a 'Sort=XX' item. Any non-pinned item has a sort of (I think) 1000. Anything pinned should start with a sort lower than that.

You can manually edit those if they are acting strange. Perhaps one is set with a Sort of 1000 or more, causing it to stay right of unpinned items.

bwat47 (bwat47) said : #2

I'd thought there was no way that this would be the intended behavior xD

It appears gnome-control-centers .dockitem has a sort of 1001 and that may have been causing my problem. I'll unpin that and hopefully it fixes it.

bwat47 (bwat47) said : #3

After playing with it for a while, I notice whenever I right click an app in the dock and hit "keep in dock" it very often gives them a sort of 1000+ which is causing this. should I report a bug for this?

bwat47 (bwat47) said : #4

Yeah it seems if I clean install plank (delete config files and reinstall), the default .dockitem files are all below 1000. But as soon as I start right clicking to keep in dock, every one that I pin that way is always given 1000+ for sorting.

bwat47 (bwat47) said : #5

It seems more appropriate to create a bug report for this, so I've created one here: