

First, the Desklet class is imported from. St function MyDesklet ( metadata, desklet_id ) Ĭonstants are declared with const, and cannot be re-declared nor changed.

Metadata.json: As it names indicates, this has the metadata for the desklet and additional options such as max-instances to allow multiple instances of the desklet.Ĭonst Desklet = imports. For example desklet requires at least two files: Then, create a directory with the name this is the UUID of the desklet. The files described in this section can be downloaded from here.įirst desklet, it prints "Hello Desktop" and can have multiple instancesįirst of all, the desklets are located at ~/.local/share/cinnamon/desklets, where each desklet has its own directory. When finished, it should look like the image below. Ok, with the previous information in mind, here a simple desklet is created and explained. More information about desklets can be find in the official repository. Moreover, desklets as well as other graphical elements in Cinnamon are written in JavaScript 3, and use the Cinnamon's JavaScript interpreter (CJS) 4. "Desklets are little programs which you can place on your desktop, on top of your desktop background" 2. At the moment of writing, Cinnamon 4.4.8 on Arch Linux was used. Because the information to develop a desklet is outdated 1, I decided to document the process, this is the first part of that process. A good day I was going through the available Desklets for Cinnamon, looking for an desklet to display graphs about the current state of the system (CPU, RAM, disks, etc.), although I found the nice desklets such as Simple monitor system, CPU Load and Disk Space, none of them quite do what I need.
