[development] extensions

Viktor edited this page May 5, 2018 · 5 revisions

Basic Structure

UUID: EXTENSION_NAME@cinnamon.org
using either your name or your domain name behind the @ sign.

Directory for extensions:

$HOME/.local/share/cinnamon/extension/UUID

Required Files:

metadata.json

  • requiredProperties: ['uuid', 'name', 'description', 'cinnamon-version'],
  • niceToHaveProperties: ['url'],

extension.js

  • requiredFunctions: ['init', 'disable', 'enable'],

Optional Files:

stylesheet.css

  • will be automaticly loaded

settings-schema.json

Metadata Example

{
    "cinnamon-version": [
        "1.8",
        "1.9", 
        "2.0"
    ], 
    "uuid": "EXTENSION_NAME@cinnamon.org", 
    "name": "EXTENSION_NAME", 
    "description": "Aweseome Extension", 
    "url" : "https://this-is-where-you-put-your-HP-or-github-or-whatever.url"
}

Extension Basic Functions

/**
 * called when extension is loaded
 */
function init(extensionMeta) {
  //extensionMeta holds your metadata.json info
  const UUID = extensionMeta['uuid'];
}

/**
 * called when extension is loaded
 */
function enable() {

}

/**
 * called when extension gets disabled
 */
function disable() {

}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.