Leif Arne Storset
Leif Arne Storset

Reputation: 969

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?

Upvotes: 5

Views: 821

Answers (1)

Leif Arne Storset
Leif Arne Storset

Reputation: 969

const Config = imports.misc.config;
if (Config.PACKAGE_VERSION.startsWith("3.42"))
    // etc.

Upvotes: 5

Related Questions