particle-os-modules/modules/gschema-overrides
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
..
gschema-overrides.sh chore(gschema-overrides): Add missing quotes for file variable 2024-02-21 15:09:36 +01:00
gschema-overrides.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 docs: Improve documentation of relocatable schemas (#177) 2024-03-26 07:12:01 +00:00

gschema-overrides

The gschema-overrides module can be used for including system-setting overrides for GTK-based desktop environments. GTK-based desktop environments include Gnome, Cinnamon, MATE, Budgie & such. This module is similar to using dconf configuration, but is better because it doesn't require a systemd service & supports build-time troubleshooting.

What does this module do?

  • It copies all content from /usr/share/glib-2.0/schemas, except existing gschema.overrides to avoid conflicts, into temporary test location.
  • It copies your gschema.overrides you provided in this module from config/gschema-overrides into temporary test location.
  • It tests them for errors in temporary test location by using glib-compile-schemas with --strict flag. If errors are found, build will fail.
  • If test is passed successfully, it copies your gschema.overrides to /usr/share/glib-2.0/schemas.
  • It compiles gschema using glib-compile-schemas in /usr/share/glib-2.0/schemas location to include your changes.

Temporary test location is:

/tmp/bluebuild-schema-test

Usage

To use this module, you need to include your gschema.override file(s) in this location (make folder if it doesn't exist):

config/gschema-overrides

Then you need to include those file(s) in recipe file, like in example configuration.

It is highly recommended to use zz1- prefix before your gschema.override name, to ensure that your changes are going to be applied.

Also don't forget to rename your file(s) too with this prefix in config/gschema-overrides.

Creating gschema.override files

Gschema.override files use gsettings keyfile format for settings output.

Example of gschema.override settings

[org.gnome.desktop.peripherals.touchpad]
tap-to-click=true

[org.gnome.settings-daemon.plugins.power]
power-button-action='interactive'

[org.gnome.mutter]
check-alive-timeout=uint32 20000

[org.gnome.shell.extensions.blur-my-shell]
sigma=5

Example of gschema.override lockscreen settings (Gnome)

[org.gnome.desktop.peripherals.touchpad:GNOME-Greeter]
tap-to-click=true
  • To gather setting change after you input the command, use this:

    dconf watch /

    When you change some setting toggle or option when this command is active,
    you will notice that command will output the key for the changed setting,
    which you can use & write into gschema.override file in the format shown in example above.

  • To gather current & available settings on booted system, you can use this command:

    gsettings list-recursively

    You should use this command everytime when you want to apply some setting override, to ensure that it's listed as available.

Gschema.override files don't support relocatable schemas & locking settings.

To add overrides for schemas not supported by gschema overrides, you can use the dconf-update-service from the bling module.

  • To gather a list of relocatable schemas, use this command:

    gsettings list-relocatable-schemas.

Example of relocatable schemas

[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
binding='<Shift><Alt><Super>s'
command='systemctl suspend'
name='Suspend'