OpenSource For You

Creating your own extensions

-

You can create your own extensions, though the dearth of documentat­ion makes the job a little tough. Adding the changes in settings and APIs can even sour the experience. Anyway, that shouldn’t stop us from trying. You need some knowledge of JavaScript and GNOME APIs. To begin, in a terminal run the following command:

gnome-shell-extension-tool –create-extension

You’ll be asked a few questions like the name of the extension, descriptio­n and unique ID (UUID). After these sWHSs, WKH WooO wLOO FUHDWH WKH fiOHs nHHGHG IoU youU HxWHnsLon, under ~/.local/share/gnome-shell/extensions/<your_ extension>. For example, I created an ‘LFY’ extension with the UUID LFY@shashwat-desktop, and a folder was created with this name in place of your_extension in the above path. ,n WKH GLUHFWoUy, you wLOO noWLFH WKUHH fiOHs Ey GHIDuOW: • extension.js: TKH PDLn -DYDSFULSW HxWHnsLon fiOH WKDW holds all the code for an extension to work. metadata.json: A -DYDSFULSW 2EMHFW NoWDWLon fiOH WKDW holds the metadata that you entered while creating the extension. stylesheet.css: Provides the look and feel for your HxWHnsLon. AOO DGGLWLonDO sWyOLnJ Ls Ln WKLs fiOH. Once you are done, simply restart the GNOME Shell and an icon will appear on the top. Upon clicking it, you may display several messages.

If you want to develop an extension, there aren’t many live examples, though GNOME has compiled a decent getting-

• started page: https://live.gnome.org/GnomeShell/Extensions. You may also want to get through the GObject used by GNOME developers to call data back and forth.

Newspapers in English

Newspapers from India