Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[1.8] Cinnamon Desklets #1034

merged 14 commits into from Jan 8, 2013


None yet
6 participants

dalcde commented Aug 17, 2012

A system for users the create desklets (aka Desktop Widgets) that appear on the desktop.

Also requires muffin changes: linuxmint/muffin#29

Examples of known implementations:
Screenlets: https://upload.wikimedia.org/wikipedia/commons/0/0f/OpenSUSE_10.3_-_Screenlets.png
KDE Desktop Widgets: https://upload.wikimedia.org/wikipedia/commons/7/78/Contour-1.0-ActivityScreen.png

The desklet system is near completion. The only remaining task is to make it consitent with #1476

Currently in the process of creating more desklets


  • Create more desklets

Cobinja commented Aug 18, 2012

I pushed some changes to my cinnamon and muffin repos:
https://github.com/Cobinja/Cinnamon/tree/desklets and

My changes enable both desklets and desktop icons to be visible at the same time. It's done by moving any window with type META_WINDOW_DESKTOP (created by nautilus etc. to handle desktop icons) from window_group to a new group called bottom_window_group, so that the desklets appear above it.

If suitable, merge. If not, leave it.


dalcde commented Aug 19, 2012

@Cobinja I'm making my own desklet branch on muffin and pulling your changes just to make things a bit more organized.

@dalcde dalcde referenced this pull request in linuxmint/muffin Aug 19, 2012


[1.8] Desklets #29


wrouesnel commented Aug 20, 2012

To be really irritating, the desklet that almost everyone (including myself) would want is something that mimicks the functionality of Fences on Windows. You can do file handling with Gnome Screenlets at the moment (and that's probably enough and better then Fences) but there's no easy way to get application launchers onto the desktop.

I'm thinking that a desklet which let you quickly add Cinnamon application menus as Fences-like collections of launchers would be an absolute winner - so for example, I'd request a container of the "Accessories" menu from the start menu. If you could then put "Places" inside a container, then I think that'd allow for an experience very much like Fences but much more self-managing.


dalcde commented Aug 24, 2012

@outsiderperspective I'm not sure if that should be done on the Cinnamon side or the file manager side. GNOME screenlet implemented it as a desklet: http://gnome-look.org/content/preview.php?preview=2&id=102890&file1=102890-1.jpg&file2=102890-2.jpg&file3=102890-3.png&name=Folderview+Screenlet&PHPSESSID=7142e51296376e0ab97959b527a46cc8

But I find it more of a file manager feature.

P.S. I think you can make desktop launchers with Nautilus by creating a desktop file. Never tried that but I think it works that way.

And you are not being irritating. Anything that can help improve Cinnamon is welcome.


wrouesnel commented Aug 24, 2012

Launchers in the filesystem strikes me as inappropriate for Linux and Freedesktop, which treats desktop launchers and their menu entries very differently. They're more complicated constructs that expect to largely automanage themselves (whereas in Windows it really is just a folder tree).

I would argue that being the Window Manager, since Cinnamon is already responsible for the panel menus, it makes sense that for a desklet in this capacity it should also be largely responsible for application launchers in them. It would also remove a source of complexity that we have currently - in that a launcher sitting in the "Desktop" folder can become desynced from the command it needs to run (and lots of things people fix in Linux require launching with custom command lines).

Also, since the "Desktop" folder is potentially something people would sync to other computers, having it filled with computer-specific program launchers becomes problematic (which is an issue I have with the way I use Fences at the moment). Being able to have a desktop populated with launchers (which is a little redundant, but I and many others it seems like it or do work this way) that weren't really there, and then have actual files on the desktop get properly backed up and synced between systems would be a big help.

So, the way I see it we'd have two desklets:

  1. Folderlet - which mimics folderview (i.e. a desklet which shows folder contents).


  1. Menulet - which would show the contents of a specified Freedesktop menu group.

When I get the time (a long-running research Ph. D in not-computer science means I've not the greatest of time at the moment) I'll probably take a swing at knocking up Menulet, but I mention it mostly because if the Folderlet/Folderview thing gets done in the meantime then it will probably have all the code to render a nice set of icons in the type of Fences-style window.

Somewhat separately, two desklet ideas I've not seen mentioned would be a multiple stopwatch/countdown timer, and a multiple timezone clock.


dalcde commented Aug 24, 2012

I think you are over-complicating things. A desktop launcher is simply a text containing a name, a command, an icon and a description. It is the same file for menu entries. Try copying an application from /usr/share/applications/ to the desktop and try.

Anyway, thank for your input!


AlbertJP commented Sep 14, 2012

@dalcde The pull request cannot be cleanly merged in its current state, it probably conflicts with another commit. As this is planned for 1.8 it does not need to be fixed yet, however.


dalcde commented Sep 14, 2012

@AlbertJP What I'm planning to do is that after all the issues get sorted, I'll squash all commits and then rebase it.


Lusito commented Nov 29, 2012

As per request from the Author I'm commenting a few things on the code:

What I noticed first is the missing of a workspace id in enabled-desklets.
So desklets are fixed on all workspaces ?
Also, the order of the enabled-desklets attributes is inconsistent with enabled-applets. in enabled-applets, you have position attributes at the start and the uuid at the end.

deskletObj = {}; // Maps uuid -> desklet objects
This is where it gets different from my multi applet implementation, I map the applet id to applet objects, since uuids are not unique anymore when using multiple instances.
You seem to (even tho the comment says otherwise) map uuids to a map of id->desklet object.

This is of course possible. But these other objects don't need to be desklet-id specific:
desklets[uuid] should be the same for every desklet instance of the same uuid (it is an import object, not the desklet object itself.
same goes for deskletMeta[uuid]. It contains the json data from metadata.json. also the same for every desklet instance of the same uuid.

As far as I can see, you are changing the meta data depending on the desklet instance, I would not do that. It should stay clean.

I just flew quickly over the code, so this is just a quick and possibly incomplete evaluation.
If you want to, we can meet up in irc and talk about it in detail.

On a side note, any reason against using screenlets ? I tried them, and they seem to work without problems on cinnamon.
There are already quite a few screenlets available, recreating them would cost some time and effort that might be spend better on other things.
Just wondering, don't want to stop you if you are interested in trying to make things better :)


dalcde commented Nov 29, 2012

RE: deskletObj{}
-> I have a 2D array of desklets, so a particular desklet might be deskletObj["clock@cinnamon.org"][3], where "3" is the desklet id.

RE: desklet importer object
-> I guess you're right :)

RE: metatdata
-> I don't see any reason why the metadata should be kept "clean". We have already added a "path" property into it and I guess there is no harm in adding another one.

-> I have my IRC on (#linuxmint-dev) whenever I'm at my computer, so feel free to come :)


dalcde commented Dec 24, 2012

Rebased to current cinnamon master

@clefebvre clefebvre added a commit that referenced this pull request Jan 8, 2013

@clefebvre clefebvre Merge pull request #1034 from dalcde/desklets
[1.8] Cinnamon Desklets

@clefebvre clefebvre merged commit ed46cb1 into linuxmint:master Jan 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment