I want to write a Cinnamon desklet, but I do not get the development cycle right. I started with a hello world desklet. Files are in ~/.local/share/cinnamon/desklets/hello@world
desklet.js
const Desklet = imports.ui.desklet;
function HelloDesklet(metadata, desklet_id) {
this._init(metadata, desklet_id);
}
HelloDesklet.prototype = {
__proto__: Desklet.Desklet.prototype
,_init: function(metadata, desklet_id) {
Desklet.Desklet.prototype._init.call(this, metadata);
this._cont = new St.Label();
this._cont.set_text("Hello, world!");
this.setContent(this._cont);
}
}
function main(metadata, desklet_id) {
return new HelloDesklet(metadata, desklet_id);
}
metadata.json
{
"uuid": "hello@world",
"name": "Hello World",
"description": "Say hello",
"prevent-decorations": false
}
So far everything is running fine, I can add the desklet and it show up the Hello World message.
Now if I change to code to write "Hello, new world!" instead of "Hello, world!", remove the desklet and add it again, the old message still shows up. How can I make Cinnamon pick up my changes?
Refer: Desklet modifications not taken into account at reload.
This is a known issue with Cinnamon 3.6, its been fixed in Cinnamon 3.8.
For now you will have to restart Cinnamon, sorry.
Check your Cinnamon version.
Other alternative is to restart Cinnamon (Ctrl+Alt+Esc or via Looking Glass
/Melange
).