Skip to content
Cassidy James Blaede edited this page Nov 27, 2018 · 2 revisions

Settings in plugs should be easily discoverable through the System Settings search bar and the Applications menu. To achieve this each plug should provide a search function that returns a map with key value pairs:

  • Key: setting path, like:
    • Applications → Default → Web browser
    • Keyboard → Shortcuts
    • Keyboard → Layout → Compose Key
    • Displays → Night Light → Color temperature
    • Mouse & Touchpad → Middle click paste
  • Value: location of setting. Like:
    • "defaults"
    • "Shortcuts"
    • "Layout"
    • "night-light"
    • ""

Search in System Settings

In case of Search in System Settings, the query is matched to the setting paths. When the user selects a matching result the settings location is passed to the search_callback, this enables System Settings to open the plug on the right page (location). If the location is empty the Plug is opened with it's default page.

Search in Applications menu

In case of the Applications menu it needs to open the right location through a URI, like:

  • settings://applications/defaults
  • settings://input/keyboard
  • settings://input/keyboard/shortcuts
  • settings://display/night-light
  • settings://input/mouse

See: System Settings Schema Specification

For that to work it looks up the uri in supported_settings using the location. For example:

  1. The user searches for "shortcuts"
  2. This is matched to Keyboard → Shortcuts which has the location: "Shortcuts".
  3. This location is looked up in supported_settings, finding input/keyboard/shortcuts.
  4. This is used to form the uri: settings://input/keyboard/shortcuts.
Clone this wiki locally