

Image of the Applet created with Gtk 3.10
Linux create desklets code#
The code is written in the same way as the previous example Let's see the code of our auto-executable written with Qt The principle is always the same to call programs, create popup-menu and popup-window according to our needs. The meaning of the -s PE size option is to specify the size of the PE, and the unit can be MB, GB, TB, etc. The specific command format is as follows: rootlocalhost vgcreate -s PE size volumegroupname physicalvolumename. which can be used using a script to execute the code written in those languages. The command used to create a volume group is vgcreate. We can also use other programming languages that have bindings for Gtk such is the case of PyGTK, Ruby Gtk, Perl Gtk, etc. Our auto-executable is called Menu and it is in the Qtmenu folder. languages with which self-executables can be created.

Our auto-executable can be written with Qt, Gtk, Gtkmm, wxWidget, Vala, etc. const PopupMenu = imports.ui.popupMenu / * PopupMenu is a library to use the menu manager, it allows us to invoke the popup-menu widget usually used in applets. * / Const Gettext = ('cinnamon-applets ') const _ = Gettext.gettext // Gettext library that allows us to import the characteristics of the Cinnamon desktop.

* / Const GLib = imports.gi.GLib / * GLib is a helper library, it allows us to do things in GNOME, for example say where the hellognome.html file is, it is the library in charge of signals. * / Const Applet = imports.ui.applet / * We invoke the Applet library that allows us to create an applet for Cinnamon and Gnome and at the same time gives us its properties and functions. Let's see each of the sentences of our previous codeĬonst Lang = imports.lang / * We invoke the Gtk and Lang libraries, they are a basic part of any GNOME application, they allow us to create windows, widgets and link them.
