Skip to content

Tuner.Combo

A selection row with a dropdown list. The current option is chosen by comparing each option's value with the setting value.

PropertyTypeDescription
titlestringRow title
subtitlestringText under the title

Static options: Tuner.Choice

Each Tuner.Choice child adds one option. value is written in GVariant text format, so string values need inner quotes:

blp
Tuner.Combo {
    title: _("Double Click");

    binding: Tuner.Setting {
        schema-id: "org.gnome.desktop.wm.preferences";
        schema-key: "action-double-click-titlebar";
    };

    Tuner.Choice {
        title: _("Maximize");
        value: "'toggle-maximize'";
    }

    Tuner.Choice {
        title: _("Minimize");
        value: "'minimize'";
    }
}

WARNING

The value variant type must match the setting key type, otherwise the current option can't be selected or saved.

Dynamic options: Tuner.FolderChoice

Tuner.FolderChoice fills the list with directory names found in system and user data dirs. Useful for themes, icons and similar resources. The stored value is the directory name (a string).

PropertyTypeDescription
lookup-dirstringDirectory name to scan (e.g. icons, themes)
content-filterstringOnly include folders containing this file or subfolder
blp
Tuner.Combo {
    title: _("Icons");

    binding: Tuner.Setting {
        schema-id: "org.gnome.desktop.interface";
        schema-key: "icon-theme";
    };

    Tuner.FolderChoice {
        lookup-dir: "icons";
        content-filter: "index.theme";
    }
}

You can also load options from any other source by extending Tuner.ChoiceLoader in your plugin code.

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