Skip to content

Getting started

Creating plugin

To create plugin you need to extend Tuner.Addin and in init block add your pages and content addins. Then build it to shared library.

vala
namespace Test {
    public class Addin : Tuner.Addin {

        construct {
            add_from_resource("/org/example/TestAddin/test.ui");
        }
    }
}

This will add pages and content addins from /org/example/TestAddin/test.ui to Tuner.

Interface

blp
using Gtk 4.0;
using Tuner 1;

translation-domain "your-translations";

Tuner.Page {
    title: _("Test Page");
    tag: "testtag";
    icon-name: "help-info-symbolic";

    Tuner.Group your_group_tag {
        title: _("Group Title");

        Tuner.Switch {
            title: _("Over Amplification");

            binding: Tuner.Setting {
                schema-id: "org.gnome.desktop.sound";
                schema-key: "allow-volume-above-100-percent";
            }
        }
    }
}

Resulting library can be placed to ~/.local/share/tuner/plugins folder with plugin description file called <plugin name>.plugin

desktop
[Plugin]
Name=Your name
Module=test

Where test should be replaced with your library name without lib prefix and .so suffix. In example above test will be extended to libtest.so

Result

Simple example in Tuner

Here you can found plugin templates for

More plugins

Released under the GPL-3.0+ License. The content is available under CC BY-SA 4.0, unless stated otherwise.