User Preferences

Lacona Addons can add entries to the Lacona Preferences page. The selected settings are then made available Extensions through an object called config.

Create a preferences schema in config.json using confine.



  "myCustomPrefs": {
    "type: "object",
    "title": "Custom Preferences",
    "properties": {
      "homepage": {
        "type": "String",
        "default": ""

After installing this addon, the Lacona Preferences should have a new entry in the sidebar - Custom Preferences, which contains a single string entry labeled Homepage. Its value will default to, but the user can change it.


The full config object will then be made available to the describe function.

/** @jsx createElement */
import { createElement } from 'elliptical'
import { Command } from 'lacona-phrases'
import { openURL } from 'lacona-api'

export const MyNewCommand = {
  extends: [Command],

  execute (result) {
    openURL({url: result})

  describe ({config}) {
    return (
        text='visit my homepage'
        value={config.myCustomPrefs.homepage} />

export default [MyNewCommand]