Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can my GNOME Shell extension detect the GNOME version?

I'd like to support multiple GNOME versions with my shell extension. How can I detect the GNOME version it's running on and branch the code appropriately?

like image 849
Leif Arne Storset Avatar asked Dec 06 '15 18:12

Leif Arne Storset


People also ask

What is gnome extension version?

What are GNOME Shell Extensions? GNOME Shell extensions are small pieces of code written by third party developers that modify the way GNOME works. (If you are familiar with Chrome Extensions or Firefox Addons, GNOME Shell extensions are similar to them.)

What is GNOME Shell version?

GNOME Shell is the graphical shell of the GNOME desktop environment starting with version 3, which was released on April 6, 2011. It provides basic functions like launching applications, switching between windows and is also a widget engine. GNOME Shell replaced GNOME Panel and some ancillary components of GNOME 2.

How do I enable GNOME Shell extension?

Install Gnome ExtensionsNavigate your Firefox browser to https://extensions.gnome.org/ and simply search for Gnome extensions you wish to install. Flip the ON switch to install the extension. Install extension by clicking on the ON switch. Click Install to confirm the gnome extension installation.


1 Answers

const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
    // etc.
like image 65
Leif Arne Storset Avatar answered Sep 28 '22 16:09

Leif Arne Storset