Embrace:ConfigFile

The configuration file's name is embrace.conf and is either in ${geany_data_path}/plugins/embrace/ or in ${users_geany_conf_path}/plugins/embrace/ - the latter takes precedence.
The configuration file is handled with glib's GKeyFile.

Each group in the config file applies to a configurable set of filetypes. It can be given as a semicolon separated list of geany filetype names. (e.g. C++; possible values are in geany's filetype_extensions.conf) The buttons of this group will appear on the toolbar only at documents of these filetype. If this key is omitted, then the group's buttons are always visible.
Each group has a type: it is either simple (default) or advanced. It declares which syntax is used in the group: see below.
The names of the groups are arbitrary.

type=simple

Each line in the group defines one embrace item, that is:

Example: p=Paragraph;<p>;</p>;p.png;<Alt><Control>p

The meaning of this line:

type=advanced

An Item on the toolbar can be either a button, or a button with submenu.
The button with submenu is initialised with the first item in it's submenu, it means it has the same name, icon and clicking the button will activate the first submenu item. When a different submenu item is activated, it takes control over the button.

Items on toolbar are given with the items key: it is a semicolon separated list of item names.
Example: items=header;bold

Every item has to be defined in the group.

Defining an item with submenu

Defining an item with submenu is easy: it's first parameter is menu, the rest are the name of the items in the submenu. (These items must be of type button.)
Example: header=menu;h1;h2;h3

Defining a simple button item

Defining a button item is more complicated, it consists of two or more lines.
Example:

bold=button;Bold;bold.png;<Alt><Control>b
bold_label[hu]=Félkövér
bold_template=<b>%selection%</b>

The first line's meaning

The second line is optional: it defines a localised (hungarian in the example) label for this item. Of course multiple lines can be given, one for each locale. At runtime, the label of the current locale is used.

The third line is the important part: it defines what will replace the selected text when this item is activated. Some text is handled specially:

special symbols in templates

defining variables used in templates

As mentioned above, you can use variables in the templates. If there is at least one variable in the template, a dialog will appear every time the template is activeted. (%newline%, %ws%, %cursor%, %selection% are not variables) Any variable may be used in any template in the group it is defined.

The possible type of a variable is one of the following:

Variables of type entry, file and count should be defined like this:

src=file|dir_sep_slash;Image file
src_label[hu]=Képfájl

And the meaning:

Definition of variables of type c_static and c_entry are quite the same, but after the label you can specify the combobox values. Example:

align=c_static;Align;top;middle;bottom;left;right
align_label[hu]=Igazítás;top;middle;bottom;left;right

Additional options is a space separated list. Possible vallues vary depending of the variable type:

file

c_static

align=c_static|label;Align;top;Top;middle;Vertically iddle;bottom;Bottom;left;Float left;right;Float right
align_label[hu]=Igazítás;top;Fent;middle;Függőlegesen középen;bottom;Lent;left;Baloldalt lebegve;right;Jobboldalt lebegve

Keybindings

Keybindings are default keybindings parsable by gtk_accelerator_parse(). It can be overwritten by the user as any other keybinding, in geany's settings dialog. They will appear in the list as groupName_internalName, e.g. html_bold. It means name clash may arise if there are underscores in both group names and button names.