Linux Format

Install and create Gnome extensions

Let’s dive into Gnome extensions! Gnome is a big system, so it’s worth understanding which parts do what. The main pieces are Glib, GTK+ and Gnome-shell. Glib contains all the core libraries for developing Gnome applications. These libraries are divided further into I/O handling, text handling and even a webkit2 interface to handle web browsers and other similar jobs.

GTK+ is the graphical user interface toolkit. With it you design the user interface and connect to the Glib library. This toolkit has official bindings to Gnome for C++, Python, Vala and of course JavaScript, so if you plan to make full applications for Gnome, you’re already on your way. Gnome Shell is what is truly interesting to us. It is the part that provides functions to switch windows, launch applications and see notifications. It also creates the Top Bar, this is where you can see most extensions. Some just change the behaviour of Gnome, but the interesting ones are on the Top Bar.

Gnome-shell is written mainly in JavaScript using bindings to the underlying layers. This is why, as we’ll see later, all extensions are written in JavaScript accessing a number of classes. When you get serious about Gnome development, you will learn the details of Mutter, Clutter and OpenGL. These are lower in the stack and support all your code. However, when you create extensions you only need to know the JavaScript classes that are in the Gnome-shell code.

Most of this tutorial is about how to handle existing extensions, but you may want to follow along with the development example at the end. You just

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format1 min read
Vector Vexations
Why does MySQL not support vectors in its community edition? Generative AI is the hot topic in tech. GenAI relies on vector data. Yet Oracle has no plans to support vectors in the community edition of MySQL. If you want to try out vector data with ot
Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin
Linux Format1 min read
Wine For Wayland
2023 was a great year for the Wayland driver for Wine. The goal was to move forward from the experimental phase and make the driver a proper upstream component. A year later, after several merge requests, many people are now already able to use the l

Related Books & Audiobooks