![]() ![]() The behaviour of the desklet still needs to be coded to have all the desired features, will be documented in a future post. Finally, the function main returns an instance of MyDesklet Next stepsīy this point there is a working desklet. The method setupUI() contains the behaviour of the desklet, see comments in the code above. Using MyDesklet.prototype allows us to add new methods to the object constructors. The function MyDesklet is the constructor for our desklet, it takes metadata (dictionary) with the metadata of the desklet, and desklet_id (int) which is the instance id of the desklet. The desklet works by using a command-line tool (gcalcli) to pull your data from Google. The Shell Toolkit is imported at imports.gi.St, it is a clutter-based toolkit that allows to add GUI elements to the desklet, St documentation can be found here. First, the Desklet class is imported from. this allows switching between workspaces with the mouse wheel. Extensions do not appear visually on those places. St function MyDesklet ( metadata, desklet_id ) Ĭonstants are declared with const, and cannot be re-declared nor changed. All are mini-programs, which work inside Cinnamon. 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. Desklet to show graphs for the level of activity in various system variables including: CPU, memory, and disks. 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. If it doesnt work, a system restart may help the desklet to detect gcalendar. If there is a warning sign in the 'Desklets' dialog, try to remove and add the desklet again. "Desklets are little programs which you can place on your desktop, on top of your desktop background" 2. sudo add-apt-repository ppa:slgobinath/gcalendar sudo apt update sudo apt install gcalendar gcalendar. Desklets ( A desktop widget feature in Cinnamon 1.8 ) on Linux Mint 15 :KDE calls them Plasmoids, Android calls them Widgets, in Cinnamon theyre called 'Des. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |