particle-os-modules/modules/gnome-extensions
xyny be6e4ba5bd
feat: add typespec schemas for modules (#233)
* feat: add typespec for bling and akmods for testing

* chore: temporarily change module source to dev branch

* feat: add missing module typespecs from blue-build/schema

* feat: add schemas for default-flatpaks module

* chore: annotate some parameters as optional

* fix: typo in default-flatpaks schema

* feat: add schema for files module

* feat: add script module schema

* feat: add signing module schema

* docs: add module.yml docs etc.

* fix(default-flatpaks): don't capitalize string in typespec

* feat: add schemas for gnome-extensions

* fix(files): properly declare string: string record type

* chore: add tsp for gschema-overrides

* chore: tsp for systemd module

* chore: add link to systemd tsp to module.yml

* chore: add tsp for yafti module

* feat: add docstrings for files module

* feat: add tsp for chezmoi module

* feat: docstrings for akmods tsp

* feat: docstrings for bling tsp

* feat: docstrings for default flatpaks tsp

* fix: link to files module docs page in files module tsp

* feat: docstrings for fonts module tsp

* feat: add docstrings for gnome extensions tsp

* feat: docstrings for gschema overrides tsp

* feat: docstrings for rpm ostree tsp

* feat: docstrings for script tsp

* feat: docstrings for signing module

* feat: docstrings for systemd tsp

* feat: docstrings for yafti module

* fix: typo in files tsp

* feat: typespec for brew module

* chore: update rpm ostree tsp for keys: prop

* fix: use typespec to declare default values

* fix: errors from previous commit

* docs: add typespec instructions

* docs: chore: add typespec docs link for docs syntax

* chore: switch to semicolon for ending property definitions

* docs: fix: typo inlude -> include

* feat: tsp for justfiles module

* chore: change links to reference main branch

---------

Co-authored-by: fiftydinar <65243233+fiftydinar@users.noreply.github.com>
2024-07-09 16:25:31 +00:00
..
gnome-extensions.sh chore(gnome-extensions): Add "null" if condition for QUIERIED_EXT in uninstall 2024-06-11 11:18:50 +02:00
gnome-extensions.tsp feat: add typespec schemas for modules (#233) 2024-07-09 16:25:31 +00:00
module.yml feat: add typespec schemas for modules (#233) 2024-07-09 16:25:31 +00:00
README.md feat(gnome-extensions): Add PK ID recipe input support (#249) 2024-06-05 13:29:20 +00:00

gnome-extensions

:::caution The legacy configuration format, which uses a part of the extension download URL to declare extensions to install, is still supported. However, it is advised to migrate to new configuration, since it offers the benefits of a clearer configuration & automatic installation of the latest extension version compatible with the GNOME version in the image. The new configuration format is showcased below in detail. :::

The gnome-extensions module can be used to install Gnome extensions inside system directory.
It also supports uninstallation as well, for extensions which are not installed through OS package manager.

This module is universally compatible with all distributions which ship Gnome, as it's not tied to specific distribution packaging format for installing extensions.

Almost all Gnome extensions are compatible for installation.

Thanks to https://extensions.gnome.org which provides releases of extensions as zips, it is very easy to maintain this module configuration.

What does this module do?

  • It checks the current Gnome version of your image
  • It parses the extension name input from module recipe file
  • It processes the jsquery from https://extensions.gnome.org using the extension name input,
    which contains useful info about latest extension version compatible with Gnome version of your image
  • Download archive URL is formed based on the info above
  • Downloaded extension archive is then extracted to temporary directory
  • All of its extracted files are copied to the appropriate final directories
    (/usr/share/gnome-shell/extensions, /usr/share/glib-2.0/schemas, & /usr/share/locale)
  • Gschema is finally compiled to include the copied extensions schemas to its database

Uninstallation step is performed similarly, except it obviously removes files from the mentioned final directories.

Usage

Extension Installation

By default, latest extension version compatible with Gnome version of your image, is installed.

How to install extensions using the module:

  1. Go to https://extensions.gnome.org or preferably Extension Manager application
  2. Search for the extension that you want to install and open its extension page
  3. If browsing through https://extensions.gnome.org, select the correct GNOME shell version, which matches the GNOME shell version of your image
    • The command gnome-shell --version can be used to get the GNOME version of a running system. If there is no GNOME shell version of the extension that matches the GNOME version of your image, that means that extension is not compatible
  4. Copy the extension name & input it in module recipe (it is case-sensitive, so be sure that you copied it correctly)

An extension might need additional system dependencies in order to function.
In that case, you should install the required dependencies before the gnome-extensions module is ran.
Information about the required dependencies (if any) are usually on the extension's page.

Extension Uninstallation

Extension uninstallation can be useful to uninstall extensions from the base image,
which are not installed through OS package manager (like extensions installed from gnome-extensions module).

However, if extensions in the base image are installed through OS package manager, than they should be removed through it instead.

How to uninstall extensions using the module:

  1. Go to Gnome Extensions app, https://extensions.gnome.org/local/ or Extension Manager application
  2. List of installed system extensions should be presented
  3. Copy the extension name & input it in module recipe (it is case-sensitive, so be sure that you copied it correctly)

Known issues

Some extensions complain about missing gschema.compiled file

This is a rarity, but some extensions might complain about this one, due to the way they are programmed with hard-coded gschema locations.
Most extensions which follow Gnome extension standards don't have this issue.

If you get the error similar to this one (Fly-Pie extension example):
GLib.FileError: Failed to open file “/usr/share/gnome-shell/extensions/flypie@schneegans.github.com/schemas/gschemas.compiled”: open() failed: No such file or directory

Then please open the issue in BlueBuild Modules GitHub repo with the affecting extension, as it's trivial to fix.
https://github.com/blue-build/modules/issues/new