Exciting changes to Applets, Desklets and Extensions for Cinnamon 1.8
by mtwebster 8

Hi there!  Clem suggested I be brief, but as this is my very first ever blog post anywhere, and because of all the cool stuff to talk about, I found it difficult.  If it’s tl;dr, skip to the boldface below!

I’d like to take a bit of time to present some of the exciting new features coming in Cinnamon, that make it easier than ever to become involved and contribute your own creations to the Cinnamon ecosystem.

First, a bit of backstory…

About a year ago, I had just discovered Cinnamon and was starting to try my hand at making applets.  I’d never touched javascript, but here was a relatively simple, lightweight way to get my feet wet, and contribute something to a community at the same time.  Over the course of a couple days, I took an existing applet, poked and prodded at it, and eventually ended up with a very similar applet, perhaps a cousin, but one that behaved more to my liking.  I quickly published and waited for the accolades to roll in.

Well, those didn’t come, but, nonetheless, I was hooked.

I did some more work on different applets, including making some from scratch.  At a certain point, I realized I needed some method of configuring my applet, as well as some place to store that configuration.  I did some searching, checked out what others were doing, and learned that there were a number of different ways to accomplish this – some complex, some not so much, but above all, there was no unified method of doing this for applets.  You basically had to implement your own API to parse a text file, or use json, or – and this was way beyond my reach at the time – use gsettings.  I ended up putting hours and hours into a custom settings API for my one little applet, just to make it more convenient for a user to adjust this or that aspect of my applet.  I learned a lot, I’ll admit, but it was painful.  There had to be a better way.

Now, with Cinnamon 1.8, there is a better way.

Cinnamon 1.8

With Cinnamon 1.8, it will now be easier than ever to manage and configure applets, desklets and extensions in Cinnamon.

We’ve developed a built-in settings API that any developer can immediately take advantage of.  Easily, without installation scripts, recompiling the gsettings schema, or mucking about parsing text files.

A brief overview:

  • No UI building!  Your user interface is built right into Cinnamon Settings.  All you have to do is define a settings schema json file to package with your applet.  The UI gets automatically generated based on this schema
  • Lots of widgets – buttons, combo boxes, radio buttons, text entries, spinners, and more.
  • Use heading and separator widgets to help with organization, and you can also indent.
  • Widget dependencies – you can enable or disable certain settings depending on the state of another setting (for now this is limited to a check button)
  • Keybindings – you can set a custom global keybinding to activate your applet or perform any other callback function.  These work even when panels and menus are open.
  • No garbage collection – you don’t have to worry about where the settings are stored, where they go to die, or what happens in between, you just interface and use them.
  • Wide range of interaction and binding types – from treating it just like gsettings, by using signal listeners and acting on them, to having the applet property being automatically updated when the setting changes.
  • No more installation scripts, or compiling schemas. (Although that can now be automated as well)

Additionally, Cinnamon Settings has been completely revamped:

  • Download, install, remove, and configure applets, desklets, extensions and themes all from Cinnamon Settings.
  • Access an applet’s configuration page (if you want to stick with an external config program, you can have the Configure button launch that instead)
  • Check for updates, and upgrade whenever one is available.

Over the next few posts we’ll get a bit more technical and go into more detail at all the changes.  This will include changes developers may have to make to their existing works to get them to play well with the Spices installer.

For now, if you want to get a head start, all of this new functionality is already in Cinnamon master on Github.

There is also a “quick start” guide here

And a (mostly) complete reference here

 

8 thoughts on “Exciting changes to Applets, Desklets and Extensions for Cinnamon 1.8

  1. Reply xenopeek May 3,2013 05:58

    Good post! Nicely written and it was just the right length IMO :) This will be a great help for new or aspiring Cinnamon applet developers. I hope to see more of such topics on Segfault.

  2. Reply Andersau May 3,2013 08:24

    The changes to cinnamon sound pretty cool – I’m really looking forward to the next version of Mint. The direction of the distribution and the community seems to be maturing at a rapid rate.

  3. Reply Matthew May 3,2013 19:26

    Unification and consistency is something that is often kicked to the side in open-source projects and I’m really glad to see it being addressed here. We can only benefit from it.

    Looking forward to the new Cinnamon!

  4. Reply kneekoo May 3,2013 23:24

    Official Linux Mint posts are never tl;dr for me. :) Great news here and I’m looking forward for the final v1.8. Good luck! :)

  5. Reply hictio May 5,2013 02:17

    Any chance of releasing a Global Menu applet or similar for Cinnamon?

  6. Reply KOLEGA May 7,2013 14:33

    to;dr you made my day… :-D. Well written segfault is in favorites now. Hope that such good blog post will be round here. Good job

  7. Reply lestcape Jun 29,2013 01:15

    How I could post a desklet at the official site of cinnamon?

  8. Reply Taz4AD Sep 9,2013 16:54

    @lestcape, I’m assuming you found the answer by now, but for anyone looking for the answer: Create an account on the spices site (http://cinnamon-spices.linuxmint.com/). Once registered and logged in, click the “+ New” button located at the top left corner of the page, select the appropriate spice, and follow the directions.

Leave a Reply