Table of Contents

Gnome - Extensions - Create an Extension

Creating the files for an extension

Extensions only require two mandatory files, so create them:

Optionally create additional files:


Distributing an Extension

Extensions are distributed as Zip files with the two required files:

example@blah.zip
    extension.js
    metadata.json

Complete Extension Zip File Layout

If additional optional files were also used in the extension, then the zip extension usually looks like this:

example@blah.zip
    locale/
        de/
          LC_MESSAGES/
              example.mo
    schemas/
        gschemas.compiled
        org.gnome.shell.extensions.example.gschema.xml
    extension.js
    metadata.json
    prefs.js
    stylesheet.css

NOTE:

  • The topic of GSettings and the schemas/ directory is explained on the Preferences page.
  • The topic of Gettext and the locale/ directory is explained on the Translations page

Installation of an extension

Extension are installed in one of two places.

For User Extensions,

~/.local/share/gnome-shell/extensions/example@blah/

For System Extensions,

/usr/share/gnome-shell/extensions/example@blah/

References

http://smasue.github.io/gnome-shell-tw

https://gjs.guide/extensions/overview/anatomy.html#metadata-json-required