1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./style.css" />
6 <link rel=
"stylesheet" media=
"screen" type=
"text/css" href=
"./design.css" />
7 <link rel=
"stylesheet" media=
"print" type=
"text/css" href=
"./print.css" />
9 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
12 <a href=.
>start
</a> =
> <a href=geda-gschem_ug.html
>gschem_ug
</a></br>
13 <div class=
"table sectionedit1"><table class=
"inline">
15 <td class=
"col0 leftalign"> << <a href=
"geda-gschem_ug-exporting.html" class=
"wikilink1" title=
"geda-gschem_ug-exporting.html">Exporting images
</a> </td><td class=
"col1 centeralign"> <strong><a href=
"geda-gschem_ug.html" class=
"wikilink1" title=
"geda-gschem_ug.html">gEDA gschem User Guide
</a></strong> </td><td class=
"col2 rightalign"> <a href=
"geda-gschem_ug-command_line.html" class=
"wikilink1" title=
"geda-gschem_ug-command_line.html">Command-line arguments
</a> >> </td>
18 <!-- EDIT1 TABLE [1-135] -->
19 <h2 id=
"configuringgschem">Configuring gschem
</h2>
23 gschem loads a series of
<em>configuration files
</em> at start-up, if they exist:
26 <li class=
"level1"><div class=
"li"> The suite
's system configuration file, called
<code>$PREFIX/share/gEDA/system-gafrc
</code></div>
28 <li class=
"level1"><div class=
"li"> The suite
's user configuration file, called
<code>$HOME/.gEDA/gafrc
</code></div>
30 <li class=
"level1"><div class=
"li"> A
<code>gafrc
</code> in the current working directory.
</div>
32 <li class=
"level1"><div class=
"li"> gschem
's system configuration file, called
<code>$PREFIX/share/gEDA/system-gschemrc
</code></div>
34 <li class=
"level1"><div class=
"li"> gschem
's user configuration file, called
<code>$HOME/.gEDA/gschemrc
</code></div>
36 <li class=
"level1"><div class=
"li"> A
<code>gschemrc
</code> in the current working directory.
</div>
41 <code>$PREFIX
</code> denotes the base installation directory for gschem (
<code>/usr
</code> on most systems), and
<code>$HOME
</code> denotes your home directory.
45 These files are scripts written in Scheme, and they are executed using a Scheme interpreter. This means that you can use the configuration files as a way of customising and extending gschem (see also
<a href=
"geda-gschem_ug-extensions.html" class=
"wikilink1" title=
"geda-gschem_ug-extensions.html">Extending gschem
</a>).
47 <div class=
"noteclassic">There are a very large number of options that affect the way gschem works, and only the most commonly-used are listed here. For a full list, see the
<code>system-gschemrc
</code> installed with gEDA.
51 <h3 id=
"settingcolors">Setting colors
</h3>
55 gschem uses three different color maps. These are:
58 <li class=
"level1"><div class=
"li"> <em>Display color map
</em> — this is the normal color map used for displaying schematics in gschem.
</div>
60 <li class=
"level1"><div class=
"li"> <em>Display outline color map
</em> — this color map is used for objects that are being modified (e.g. during movement or during placement of objects pasted from the clipboard).
</div>
62 <li class=
"level1"><div class=
"li"> <em>Print color map
</em> — used during export to PostScript.
</div>
67 gschem is distributed with some full
<a href=
"geda-gschem_ug-viewing_schematics.html#color_maps" class=
"wikilink1" title=
"geda-gschem_ug-viewing_schematics.html">color maps
</a>, which are supplied as Scheme scripts. They can be loaded with
<code>load
</code>; for example, to load the default dark background color map, add the following to a configuration file:
69 <pre class=
"code">(load (build-path geda-rc-path
"gschem-colormap-darkbg
"))
</pre>
72 You can also set individual colors using the
<code>display-color-map
</code>,
<code>display-outline-color-map
</code> and
<code>print-color-map
</code> functions. For example, to set the display color for nets to a light blue, you could add the following to a configuration file:
74 <pre class=
"code">(display-color-map
'((net
"#
00ffff
")))
</pre>
77 Color settings should be placed in a gschem configuration file.
82 <h3 id=
"keybindings">Key bindings
</h3>
86 A gschem
<a href=
"geda-gschem_ug-editing_actions.html" class=
"wikilink1" title=
"geda-gschem_ug-editing_actions.html">editing action
</a> can be bound to a keystroke or a sequence of keystrokes (a
<em>key sequence
</em>). The
<code>global-set-key
</code> function is used to modify keybindings.
90 Each keystroke is defined using a string consisting of a non-modifier key name, prefixed by zero or more modifiers surrounded by angle brackets (
"<code><</code>" and
"<code>></code>"). The supported modifiers are
<code><Control
></code>,
<code><Shift
></code>,
<code><Alt
></code>,
<code><Super
></code>,
<code><Hyper
></code> and
<code><Meta
></code> (these are not available on all keyboards).
92 <div class=
"noteimportant">Although key bindings will be displayed in gschem using internationalised key names, you must use the English names in the configuration files.
95 A key sequence is a string containing two or more keystrokes separated by spaces.
102 <li class=
"level1"><div class=
"li"> To bind the
"New Window
" command to a typed
<kbd>F
</kbd> followed by an
<kbd>N
</kbd>:
<pre class=
"code">(global-set-key
"F N
" 'file-new-window)
</pre>
105 <li class=
"level1"><div class=
"li"> To run the
"Deselect All
" command when the
<kbd>Ctrl
</kbd> and
<kbd>Shift
</kbd> keys are held down and an
<kbd>A
</kbd> is typed:
<pre class=
"code">(global-set-key
"<Control
><Shift
>A
" 'edit-deselect)
</pre>
108 <li class=
"level1"><div class=
"li"> To display the
"Snap Size
" dialog box when
<kbd>O
</kbd> is typed, followed by
<kbd>S
</kbd> typed with the
<kbd>Shift
</kbd> key held down:
<pre class=
"code">(global-set-key
"O
<Shift
>S
" 'options-snapsize)
</pre>
114 Key settings should be placed in a gschem configuration file.
119 <h3 id=
"symbolandsourcelibraries">Symbol and source libraries
</h3>
123 The
<code>component-library
</code> function is used to add symbol libraries to the
<a href=
"geda-gschem_ug-components.html" class=
"wikilink1" title=
"geda-gschem_ug-components.html">"Select Component...
" window
</a>. A symbol library is a directory that contains symbol (
"<code>.sym
</code>") files. To add a directory as a symbol library, add the following to your configuration file:
125 <pre class=
"code">(component-library
"/path/to/mysymbols
")
</pre>
128 You can optionally set a different name for the library as an additional argument to
<code>component-library
</code>:
130 <pre class=
"code">(component-library
"/path/to/mysymbols
" "My Symbols
")
</pre>
133 To add all subdirectories of a particular directory as symbol libraries, use
<code>component-library-search
</code>:
135 <pre class=
"code">(component-library-search
"/path/to/mysymbollibs/
")
</pre>
138 This will (recursively) look for directories that contain symbols below the specified path, and add them to the
"Select Component...
" window.
142 To add a directory to be searched for
<a href=
"geda-gschem_ug-hierarchy.html" class=
"wikilink1" title=
"geda-gschem_ug-hierarchy.html">subcircuit schematics
</a>, use the
<code>source-library
</code> function. This is similar to the
<code>component-library
</code> function, except that it does
<em>not
</em> accept an optional name argument.
146 Library settings should be placed in a gEDA/gaf suite configuration file, so that the symbol libraries are available to other gEDA tools (especially
<a href=
"geda-gnetlist_ug.html" class=
"wikilink1" title=
"geda-gnetlist_ug.html">gnetlist
</a>).