User-installed: ~/.local/share/cinnamon/applets.System-installed: /usr/share/cinnamon/applets.So after reading a couple of tutorials (See “References” at the bottom of this post), the best way to grasp how to get X done is by reading the sources of existing applets: And there’s another thing you better be good at: Read The SourceĪs of December 2018, the API for Cinnamon applets is hardly documented, and it’s somewhat messy. OK, it’s usually just a few percents, and still, what is it doing all that time with no user activity? Answer: Running some JavaScript, I suppose.īut all in all, if you’re good with JavaScript and understand the concepts of GUI programming and events + fairly OK with object oriented programming, it’s quite fun. A situation that is familiar to anyone with JavaScript experience.Īnd I also finally understand why the cinnamon process hogs CPU all the time. And yes, there’s an error log console which helps with syntax errors (reminds browsers’ error log, discussed below) but often run-time errors just lead to nothing. In particular, this thing about nothing happening when there’s an error, now go figure what it was. Cinnamon’s applets are in fact written in JavaScript, and it feels pretty much the same. So what is it like? Well, quite similar to writing something useful in JavaScript for a web page. Rather, I’ll discuss about some general aspects of writing an applet. Spoiler: I’m not going to dive into the details of that, because my hostapd-firewall-DHCP daemon setting is quite specific. Given the so-so level of difficulty, I should have done that to begin with. Speaking of which, my system is Linux Mint 19 on an x86_64, with $ cinnamon -version I first went for Argos catch-all extension, and learned that Cinnamon isn’t gnome-shell, and in particular that extensions for gnome-shell don’t (necessarily?) work with Cinnamon. What I wanted: A simple applet on Cinnamon, which allows me to turn a service on and off (hostapd, a Wifi hotspot).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |