Inkscape Configuration Files

Inkscape can be fully customized through the configuration files, usually located in the share/inkscape directory (/usr/share/inkscape in Linux).

Preferences

The user file .inkscape/preferences.xml contains all the preferences that are accessible from the Preferenze di Inkscape dialog, as well as quite a few that are not. This section gives information on a few of the latter.

Alternative Alt Key

New in v0.46.

Some window managers use Alt+Left Mouse Drag and Alt+Left Mouse Click for their own purposes thereby preventing Inkscape from receiving the mouse input. In the group id="mapalt" section you can select an alternative «Alt» key. A numerical value of 1 selects the default «Alt» key. The numbers 2 through 5 select alternative keys. You can see which keys they correspond to by running the xkeycaps program available from www.jwz.org.

Alternatively, you can switch the window manager to use another key (such as the «Windows» or «Command» key instead of the Alt key. See the FAQ.

Outline Mode Colors

Updated in v0.45

You can specify the colors used in the Outline Mode in the group id="wireframecolors" section. Colors are specified in decimal form (converted from a rgba esadecimale value to base ten).

onlight

Default: 255 (#000000ff or black). Color used when stroke crosses a light background.

ondark

Default: 4294967295 (#ffffffff or white). Color used when stroke crosses a dark background.

images

Default: 4278190335 (#ff0000ff or red). Color used to outline images.

clips

Default: 16711935 (#00ff00ff or green). Color used for clip paths.

masks

Default: 65535 (#0000ffff or blue). Color used for masks.

You can force Inkscape to start up in Outline Mode by changing the value of outline in the group id="startmode" to 1.

SVG Output

Updated in v0.45.

A number of preferences control the way content is written to the SVG files. They can be found in the group id="svgoutput" section.

usenamedcolors

Default: 0. If '0', colors are written as three-digit esadecimale numbers where possible or as six-digit esadecimale numbers if not. If non-zero, colors are written when possible with SVG color keyword names such as blue or black. Use of keyword names can cause problems with some Effects.

numericalprecision

Default: 8. This is the number of significant digits written out for a number. Lowering the number will save a small amount of space at a cost of precision.

minimumexponent

Default: -8. Any number smaller than 10 raised to this value (10-8) is written out as 0.

indent

Default: 2. Number of spaces used for indenting between nested levels of SVG tags. A value of '0' disables indentation.

inlineattrs

Default: 0. If '0', attributes are separated by newlines; otherwise, attributes are placed on the same line as their tags.

Custom Templates

New drawing templates can be added by adding new files to the directory share/inkscape/templates (for system-wide use) or to the templates subdirectory in your Inkscape preferences directory. As of v0.46, the templates directory is listed under the Places part of the Salva Come dialog. You can directly save any SVG file to this directory. Saving the file as default.svg will replace your current default template.

[Suggerimento]Suggerimento

Objects, gradients, patterns, etc. can be added to an empty Inkscape SVG file and then saved and placed in the templates directory. When that file is selected in the list of templates, you will have access to all the objects, gradients, and patterns you previously defined.

Custom Swatches or Palettes

You can add custom Swatches (Palettes) to Inkscape by adding the appropriate files under the share/inkscape/palettes directory. The file format follows the Gimp palettes file format so palettes can be shared between the two programs.

The file format is very simple, as the following example 5 color palette file shows.

GIMP Palette          1
Name: MyPalette       2
#                     3
  0   0   0 Black     4
255   0   0 Red
  0 255   0 Green
  0   0 255 Blue
255 255 255 White
   

1

Declaration of the type of file.

2

Name of palette. Shown in list of palettes.

3

Comment.

4

List of colors. There is one color per line. Each color is defined as three numbers representing the values of red, green, and blue followed by a name (shown when the cursor hovers over the swatch). The range of values is 0-255, where 255 means that the corresponding color is fully turned on. The above palette consists of the colors black, red, green, blue, and white.

Custom Markers

It is possible to add custom markers to Inkscape by editing the file containing the marker definitions share/inkscape/markers/markers.svg. Here is the definition needed to add a «diamond node» marker. It differs from the diamond markers included with Inkscape in that the center of the diamond is gray and the orientation doesn't depend on the slope of the lines.


    <marker style="overflow:visible;"                    1
       id="DiamondNode"                                  2
       refX="0.0"                                        3
       refY="0.0"
       orient="0.0"                                      4
       inkscape:stockid="DiamondNode">                   5
      <path                                              6
         transform="scale(0.8) rotate(180)"
         style="fill-rule:evenodd;stroke:#000000;fill:#BFBFBF;
                stroke-width:0.5pt;marker-start:none;"
         d="M 0.0,2.5 L 2.5,0.0 L 0.0,-2.5 L -2.5,0.0 L 0.0,2.5 z "
         id="path1234"
         sodipodi:nodetypes="ccccc" />
    <marker>                                             7

   

1

Start of marker definition. (The «overflow:visible» declaration indicates that the marker should not be clipped if it extends outside a clipping box.)

2

Name of marker.

3

Offset of marker origin from node position.

4

Orientation of marker. If a numerical value, the orientation of the marker with respect to the screen coordinates. If «auto», then it is aligned with the direction of the path at the node (or the average of the directions of the path in and path out if a corner node).

5

Inkscape id of marker.

6

The definition of the path of the marker. See the file format for Paths in the appendix for more details.

7

End of marker definition.

For more details, see the Markers section of the SVG specification.

Custom Keyboard Shortcuts

You can change the keyboard shortcuts used by Inkscape by editing or replacing the file share/keys/defaults.xml.

There are a number of alternative shortcuts available. To use them, simply rename the file to defaults.xml.

  • New in v0.46

    ACD Systems Canvas: acd-canvas.xml.

  • New in v0.46

    Corel Draw: corel-draw-x4.xml.

  • Freehand: macromedia-freehand-mx.xml.

  • Illustrator: adobe-illustrator-cs2.xml.

  • Xara: xara.xml.

  • New in v0.46

    Zoner Draw: zoner-draw.xml.

  • Right-handed illustration (for use in drawing on a tablet with a stylus held by the right hand; most commonly keyboard shortcuts are accessible with the left hand): right-handed-illustration.xml.

You can also add shortcuts to a keys/defaults.xml in your Inkscape preferences directory. These will override any shortcuts defined in the system-wide defaults.xml file. See the comments in the default file for more details.

One particularly handy shortcut customization is to bind often-used Effects to keys. Here is an example of binding the / key to the Add Nodes effect:


<?xml version="1.0"?>
<keys name="My Customization">
 <bind key="slash" action="org.ekips.filter.addnodes" display="true"/>
</keys>