gschem loads a series of configuration files at start-up, if they exist:
$PREFIX/share/gEDA/system-gafrc
$HOME/.gEDA/gafrc
gafrc
in the current working directory.$PREFIX/share/gEDA/system-gschemrc
$HOME/.gEDA/gschemrc
gschemrc
in the current working directory.
$PREFIX
denotes the base installation directory for gschem (/usr
on most systems), and $HOME
denotes your home directory.
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 Extending gschem).
system-gschemrc
installed with gEDA.
gschem uses three different color maps. These are:
gschem is distributed with some full color maps, which are supplied as Scheme scripts. They can be loaded with load
; for example, to load the default dark background color map, add the following to a configuration file:
(load (build-path geda-rc-path "gschem-colormap-darkbg"))
You can also set individual colors using the display-color-map
, display-outline-color-map
and print-color-map
functions. For example, to set the display color for nets to a light blue, you could add the following to a configuration file:
(display-color-map '((net "#00ffff")))
Color settings should be placed in a gschem configuration file.
A gschem editing action can be bound to a keystroke or a sequence of keystrokes (a key sequence). The global-set-key
function is used to modify keybindings.
Each keystroke is defined using a string consisting of a non-modifier key name, prefixed by zero or more modifiers surrounded by angle brackets (”<
” and ”>
”). The supported modifiers are <Control>
, <Shift>
, <Alt>
, <Super>
, <Hyper>
and <Meta>
(these are not available on all keyboards).
A key sequence is a string containing two or more keystrokes separated by spaces.
Some examples:
(global-set-key "F N" 'file-new-window)
(global-set-key "<Control><Shift>A" 'edit-deselect)
(global-set-key "O <Shift>S" 'options-snapsize)
Key settings should be placed in a gschem configuration file.
The component-library
function is used to add symbol libraries to the "Select Component..." window. A symbol library is a directory that contains symbol (”.sym
”) files. To add a directory as a symbol library, add the following to your configuration file:
(component-library "/path/to/mysymbols")
You can optionally set a different name for the library as an additional argument to component-library
:
(component-library "/path/to/mysymbols" "My Symbols")
To add all subdirectories of a particular directory as symbol libraries, use component-library-search
:
(component-library-search "/path/to/mysymbollibs/")
This will (recursively) look for directories that contain symbols below the specified path, and add them to the “Select Component…” window.
To add a directory to be searched for subcircuit schematics, use the source-library
function. This is similar to the component-library
function, except that it does not accept an optional name argument.
Library settings should be placed in a gEDA/gaf suite configuration file, so that the symbol libraries are available to other gEDA tools (especially gnetlist).