Configuration Settings
Introduction
This document describes the Lepton EDA
suite configuration system.
Currently, there are two types of configuration files:
- Traditionally, Lepton EDA and gEDA settings were stored as Scheme source code
files, and some of them are still in use:
gafrcandgschemrc(see below). The work is underway to convert them to the new configuration system. - New settings are stored in
*.confini-like text files and can be accessed using thelepton-cli configcommand.
Important:
Starting with Lepton EDA release
1.9.10:
- Most of the gafrc and gschemrc options are deprecated and replaced with new configuration parameters. For remaining options see the Legacy configuration files still in use section below.
- All the gnetlistrc options are deprecated. Please stop using this legacy configuration file.
- Legacy names for
*.confconfiguration files are no longer used: instead ofgeda.conf,geda-user.confandgeda-system.conf, configuration files are namedlepton.conf,lepton-user.confandlepton-system.conf, respectively. The lepton-upcfg(1) utility can upgrade your settings stored ingeda*.conffiles. - The directory for user configuration files is
$XDG_CONFIG_HOME/lepton-eda/(usually,~/.config/lepton-eda/). - The directory
~/.gEDA/is not used anymore.
Note: Recently added options and groups of options may be marked with [ release ], designating their introduction in the specified Lepton EDA release, for example: [ 1.9.10 ] => available since Lepton EDA 1.9.10.
Table of contents
- Resources
- Legacy configuration files still in use
- Overview of the new configuration system
-
Configuration settings for tools in the Lepton EDA suite
-
lepton-schematic
- [schematic.gui]
- [schematic.tabs]
- [schematic.status-bar]
- [schematic.undo]
- [schematic.log-window]
- [schematic.macro-widget]
- [gschem] ([schematic] [ 1.9.10 ])
- [gschem.library] ([schematic.library] [ 1.9.10 ])
- [gschem.printing] ([schematic.printing] [ 1.9.10 ])
- [schematic]
- [schematic.backup]
-
[schematic.attrib] (former
gafrcoptions)
-
lepton-netlist
- [gnetlist] ([netlist] [ 1.9.10 ])
- [gnetlist.hierarchy] ([netlist.hierarchy] [ 1.9.10 ])
- lepton-cli
-
lepton-schematic
- Deprecated settings
- Obsolete settings
Resources
Documentation
- lepton-cli man page
- lepton-upcfg man page
- Configuration system specification
- Lepton EDA Scheme reference manual - chapter 2.5: configuration functions
Web pages
- Lepton EDA home page
- gitter.im chat room: get in touch with Lepton EDA users and developers
- gEDA mailing lists
- gEDA wiki
- dmn's documentation, links and resources for Lepton EDA users and developers page
Utilities
- GUI configuration utility:
lepton-conf
(home page).
lepton-confhas the ability to work with either legacy (geda*.conf) or new (lepton*.conf) configuration files, which could be helpful in settings upgrade process.
Other resources (outdated, but may be useful)
- gaf (lepton-cli's old name) wiki page
- gschem user guide - configuring gschem
Legacy configuration files still in use
gafrc
Configuration file used by various tools in the Lepton EDA suite.
Files named gafrc are read from ~/.config/lepton-eda/
(user configuration) and from a directory where you run the lepton-eda
tools (configuration for current directory). Expressions in this file
controls the following settings:
- Component and source libraries. Component libraries is a list of
directories where Lepton will search for symbol files (
*.sym). Source libraries is a list of directories where Lepton will search for source files (defined by thesource=attribute) used in hierarchical schematics.-
( reset-component-library )
Clear the list of component libraries. -
( reset-source-library )
Clear the list of source libraries. -
( component-library PATH NAME )
Add the directoryPATHto the list of component libraries giving it a display nameNAMEwhich will be shown in the "Add Component" dialog inlepton-schematic, for example:
( component-library "/home/dmn/sym" "MySymbols" )
-
( component-library-search PATH PREFIX )
Add the directoryPATHrecursively with all its sub-directories to the list of component libraries. Directories added with this command will be shown in the "Add Component"lepton-schematicdialog prefixed with the stringPREFIX, for example:
( component-library-search "/home/dmn/my-libs" "MyLibs::" ) -
( source-library PATH )
Add the directoryPATHto the list of source libraries.
-
- Color scheme used for exporting/printing by
lepton-cli exportandlepton-schematic'sFile->Write Image...(if "Image type" is set to PDF) andFile->Print...main menu commands.-
( primitive-load FILE )
Load a color scheme from fileFILE, for example:
( primitive-load "/usr/share/lepton-eda/print-colormap-darkbg" )
-
gschemrc
Configuration file for lepton-schematic schematic editor.
Files named gschemrc are read from ~/.config/lepton-eda/
(user configuration) and from a directory where you run
lepton-schematic (configuration for current directory).
Expressions in this file controls the following settings:
-
Color scheme used to draw schematics.
-
( primitive-load FILE )
Load a color scheme from fileFILE, for example:
( primitive-load "/usr/share/lepton-eda/gschem-colormap-bw" )
-
-
Custom keyboard shortcuts.
Overview of the new configuration system
Configuration parameters are always evaluated within a configuration context. Each context is associated with a configuration file (although the file does not necessarily need to exist).
There are five configuration contexts:
-
DEFAULT- contains default values for configuration settings (read-only)
- configuration file: none
- parent context: none
-
SYSTEM- contains system-wide settings
- configuration file:
lepton-system.conf[ 1.9.10 ] (formergeda-system.conf) - configuration file location:
$PREFIX/share/lepton-eda/($PREFIXis the installation prefix, e.g./usror/usr/local) - parent context:
DEFAULT -
lepton-cli configoption to access this context:--system(-s)
-
USER- contains per-user settings
- configuration file:
lepton-user.conf[ 1.9.10 ] (formergeda-user.conf) - configuration file location:
$XDG_CONFIG_HOME/lepton-eda/(usually,~/.config/lepton-eda/) - parent context:
SYSTEM -
lepton-cli configoption to access this context:--user(-u)
-
PATH- contains per-project (per-directory) settings
- configuration file:
lepton.conf[ 1.9.10 ] (formergeda.conf) - configuration file location: current directory (or directory specified by
--project) - parent context:
USER -
lepton-cli configoption to access this context:--project[=PATH](-p)
-
CACHE- contains program-specific settings (dialog geometry, command history, etc.; normally, you do not use it directly)
- configuration file:
gui.conf - configuration file location:
$XDG_CACHE_HOME/lepton-eda/(usually,~/.cache/lepton-eda/) - parent context: none
-
lepton-cli configoption to access this context:--cache(-c)
Context inheritance means that if particular configuration parameter is not found in current context, the value from the parent context will be used. And if parameter is set in the child context it will override one set in the parent context(s).
Configuration file contains groups and key=value pairs, for example:
[group]
key=valueLines beginning with a # and blank lines are considered comments:
# This is a commentlepton-cli utility with the config command is used to
read and write configuration settings:
lepton-cli config [OPTION] [GROUP KEY [VALUE]]
OPTION can be either --system, --user, --project[=PATH], or --cache
to access the SYSTEM, USER, PATH or CACHE context, respectively.
For example, to get value of the font key from the schematic.gui
group in the USER configuration context, issue the following command:
$ lepton-cli config --user "schematic.gui" "font"It will print the result to standard output:
OpenGost Type B TT Regular
To set that value to Monospace Regular for configuration in the current
directory, type:
$ lepton-cli config --project "schematic.gui" "font" "Monospace Regular"Configuration settings for tools in the Lepton EDA suite
1. lepton-schematic
-
use-docks- type: boolean
- default value:
false - How to display widgets: as dialogs (
false) or inside the dock widgets (true).
-
use-tabs- type: boolean
- default value:
true - Whether to use tabbed GUI: display each schematic in its own tab within GtkNotebook widget.
-
- type: string
- default value:
""(empty string) - The name of the font to be used to draw text in schematics.
For example:
font=OpenGost Type B TT Regular
-
text-sizes- type: list of strings
- default value: empty list
- If set, these values will appear in the 'size' combo box of 'add text'
and 'edit text' dialogs instead of the default ones
(set in
gschem_toplevel.c: 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26). For example:text-sizes=2;3;4;5;6;8
-
max-recent-files- type: integer
- default value:
10 - Maximum number of recent files to show in
File->Open Recentmenu.
-
title-show-path- type: boolean
- default value:
false - Whether to show full file path in the main window's title.
-
restore-window-geometry- type: boolean
- default value:
true - Whether to restore main window's size and position on startup.
-
- type: boolean
- default value:
true - Controls if the editing grips are drawn when selecting objects.
-
- type: boolean
- default value:
true - Controls if the toolbars are visible or not.
-
- type: boolean
- default value:
true - Controls if the scrollbars are visible or not.
-
- type: boolean
- default value:
true - Controls if the handleboxes for the menu and toolbars are visible or not.
-
- type: boolean
- default value:
true - Sets the zoom functions to pan the display and then zoom.
-
- type: boolean
- default value:
false - Controls if text is drawn properly or if a simplified version (a text string bounding box) is drawn during mouse pan. Drawing a simple box speeds up mousepan a lot for big schematics.
-
continue-component-place[ 1.9.10 ]- type: boolean
- default value:
true - Controls the behavior of the "Select Component..." dialog. Allows to place multiple instances of a component without having to press the "Apply" button each time.
-
- type: boolean
- default value:
true - Controls if the preview area in the File Open/Save As dialog boxes is enabled.
-
- type: boolean
- default value:
true - Controls if the movement between hierarchy levels of the same underlying schematics is allowed or not. If this is enabled, then the user cannot (without using the page manager) move between hierarchy levels. Otherwise, the user sees all the hierarchy levels as being flat.
-
third-button-cancel[ 1.9.10 ]- type: boolean
- default value:
true - Controls if the third mouse button cancels draw actions such as placing of a component or drawing of a primitive.
-
- type: boolean
- default value:
false - Controls if the cursor is warped (moved) when you zoom in and out.
-
- type: boolean
- default value:
false - Controls if the entire bounding box of a symbol is used when figuring out which end of the pin is considered the active port. This option is for backward compatibility with old schematic file format.
-
- type: boolean
- default value:
true - Guess the best continuation direction of an L-shape net when adding a net.
-
- type: boolean
- default value:
false - Determines if the newly placed components are embedded in the schematic.
-
- type: boolean
- default value:
true - Maintain net connections when you move a connected component or net.
-
- type: boolean
- default value:
true - Whether to mark a possible connection that is close to the current cursor position when drawing a net.
-
- type: int
- default value: 20
- The percentage size increase/decrease when zooming in/out with the mouse wheel. Negative values reverses the direction.
-
- type: int
- default value: 1
- Controls how much the display pans when using mouse. A larger value provides greater pan distance when moving the mouse.
-
- type: int
- default value: 20
- Controls how much the display pans when using the keyboard keys. A larger value provides greater pan distance.
-
select-slack-pixels[ 1.9.10 ]- type: int
- default value: 10
- Controls how many pixels around an object can still be clicked as part of that object. A larger value gives greater ease in selecting small, or narrow objects.
-
- type: int
- default value: 10
- Sets the default text size.
-
- type: int
- default value: 10
- Sets the default grid spacing.
-
- type: int
- default value: 8
- Controls the number of scroll pan events required to traverse the viewed schematic area. Larger numbers mean more scroll steps are required to pan across the viewed area and giving finer control over positioning.
-
- type: int
- default value: 1
- Controls the size of the grid dots (in pixels) in the dots grid display.
-
dots-grid-fixed-threshold[ 1.9.10 ]- type: int
- default value: 10
- Specifies the minimum number of pixels for the grid to be displayed. Controls the density of the displayed grid (smaller numbers will cause the grid to be drawn denser). This option is only effective when the dots-grid-mode is set to "fixed".
-
mesh-grid-display-threshold[ 1.9.10 ]- type: int
- default value: 3
- Specifies the minimum line pitch for the grid to be displayed. Controls the maximum density of the displayed grid before the minor, then the major grid lines are switched off.
-
action-feedback-mode[ 1.9.10 ]- type: string
- default value:
outline - values:
outline,boundingbox - Sets the default action feedback mode for copy, move, and component place operations. When set to "boundingbox", just a box surrounding objects is drawn, which is much faster. It may help with slow hardware.
-
- type: string
- default value:
both - values:
both,lower,upper - Sets the default caps style used for the input of text.
-
- type: string
- default value:
mousepan - values:
mousepan,popup,action,stroke,repeat - Controls what the middle mouse button does:
-
mousepan: mouse panning -
popup: display the popup menu -
action: perform an action on a single object -
stroke: draw strokes -
repeat: repeat the last command
-
-
- type: string
- default value:
popup - values:
popup,mousepan - Controls what the third mouse button does:
-
popup: display the popup menu -
mousepan: mouse panning
-
-
- type: string
- default value:
classic - values:
classic,gtk - Controls the binding of the mouse scroll wheel:
-
classic: zoom in/out, withCtrl- horizontal scroll, withShift- vertical scroll -
gtk: vertical scroll, withShift- horizontal scroll, withCtrl- zoom in/out
-
-
- type: string
- default value:
mesh - values:
mesh,dots,none - Sets the type of the grid.
-
- type: string
- default value:
variable - values:
variable,fixed - Controls the mode of the dotted grid.
In the
variablemode, the grid spacing changes depending on the zoom factor. In thefixedmode, the grid always represents the same number of units as the snap-spacing. You can control the density of the grid using thedots-grid-fixed-thresholdoption.
-
- type: string
- default value:
enabled_net - values:
enabled_net,enabled_all,disabled - Controls how many net segments are selected when you click at a net:
-
enabled_all:- first click selects the net itself
- second click selects all nets directly connected to the selected one
- third click in addition selects all nets with equal
netnameattributes
-
enabled_net:- first click selects the net itself
- second click selects all nets directly connected to the selected one
-
disabled:- mouse clicks just selects the clicked net
-
-
- type: string
- default value:
title-B.sym - Symbol (usually, a title block) to be automatically added when a new page is created. If you do not want to use a title block, set this option to an empty string.
-
use-toplevel-windows[ 1.9.11 ]- type: boolean
- default value:
false - When docking windows GUI is off, allow the following widgets to act
as top-level windows (do not stay on top of the main window):
- Object properties
- Text properties
- Options
- Log
- Find text results
- Page manager
- Font selector
- Color scheme editor
-
- type: boolean
- default value:
true - Draw either new (smaller) placeholders for missing schematic symbols
(
true), or classic ones (giant red triangles with an exclamation mark and two lines of text) if this option is set tofalse.
-
show-close-button- type: boolean
- default value:
true - Whether to show "close" button on each tab.
-
show-up-button- type: boolean
- default value:
true - Whether to show "hierarchy up" button on each tab.
-
show-tooltips[ 1.9.10 ]- type: boolean
- default value:
true - Whether to show tabs tooltips in tabbed GUI.
-
show-mouse-buttons- type: boolean
- default value:
false - Whether to show mouse buttons assignment indicators.
-
show-rubber-band- type: boolean
- default value:
true - Whether to show net rubber band mode indicator.
-
show-magnetic-net- type: boolean
- default value:
true - Whether to show magnetic net mode indicator.
-
status-bold-font- type: boolean
- default value:
false - Whether to display the status line with bolder font weight.
-
- type: string
- default value:
"green" - Color to use for the status line text when some mode is activated.
The string can be either one of a set of standard names
(taken from the X11
rgb.txtfile), or a hex value in the form#rrggbb.
-
modify-viewport- type: boolean
- default value:
false - Allow undo/redo operations to change pan and zoom.
-
- type: boolean
- default value:
true - Controls if the undo is enabled or not.
-
- type: string
- default value:
disk - values:
disk,memory - Controls what kind of medium is used for storing undo data.
The
diskmechanism is nice because you get undo-level number of backups of the schematic written to disk as backups so you should never lose a schematic due to a crash.
-
- type: int
- default value: 20
- Determines the number of levels of undo.
-
- type: boolean
- default value:
false - Controls if pan or zoom commands are saved in the undo list. If this is enabled, then a pan or zoom will be considered a command and can be undone.
-
font- type: string
- default value:
"Monospace 11" - Custom font for the log window (e.g.
"Monospace 10").
[schematic.macro-widget] group:
-
history-length- type: integer
- default value: 10
- Maximum number of items to keep in the macro-widget command history.
-
font- type: string
- default value:
"Monospace 11" - Font to be used to draw text in the macro-widget command entry.
For example:
font=Monospace 12
[gschem] ([schematic] [ 1.9.10 ]) group:
-
default-filename- type: string
- default value:
"untitled" - Default file name for any new schematic files.
It is used to create filenames of the form
untitled_N.schwhereNis a number.
[gschem.library] ([schematic.library] [ 1.9.10 ]) group:
-
- type: string list
- default value:
* - List of attribute names (semicolon-separated) that are displayed in the component select dialog.
An empty list will disable the attribute view.
If the first list element is an asterisk
"*", all attributes will be displayed in the alphabetical order.
-
- type: boolean
- default value:
false - If
true, the component libraries are sorted alphabetically. Otherwise they are sorted in the order opposite to what they were added in.
[gschem.printing] ([schematic.printing] [ 1.9.10 ]) group:
-
- type: string
- default value:
auto - values:
auto,portrait,landscape - When using a paper size, set the orientation of the output.
If
"auto"layout is used, the orientation that best fits the drawing will be used.
-
- type: boolean
- default value:
false - Toggle monochrome (
true) or color (false) output.
-
- type: string
- default value:
"iso_a4" - Size the output for a particular paper size.
The default value depends on the current locale.
Described in the PWG 5101.1 standard (Printer Working
Group "Media Standardized Names").
Examples:
iso_a4,iso_a5,na_letter.
-
- type: int
- default value: 200
- Sets the size of the auto bus rippers.
-
- type: string
- default value:
component - values:
component,net - Sets the bus ripper type, either a symbol (
component) or plain net.
-
- type: string
- default value:
busripper-1.sym - The default bus ripper symbol, used when the
schematic::bus-ripper-typeconfiguration key is set to "component". The symbol must exist in a component library.
-
bus-ripper-rotation[ 1.9.10 ]- type: string
- default value:
non-symmetric - values:
non-symmetric,symmetric - This deals with how the bus ripper symbol is rotated when it is auto added to a schematic.
-
- type: boolean
- default value:
true - Controls if the net consolidation code is used when schematics are read in, written to disk, and when nets are being drawn (does not consolidate when things are being copied or moved yet). Net consolidation is the connection of nets which can be combined into one.
-
- type: boolean
- default value:
true - Determines if the logging mechanism is enabled.
-
- type: string
- default value:
later - values:
later,startup - Controls if the log window is shown when lepton-schematic is started up
(
startup), or not (later).
-
- type: int
- default value: 120
- Controls how often a backup copy is made, in seconds. The backup copy is made when you make some change to the schematic, and there were more than "interval" seconds from the last autosave. Autosaving will not be allowed if setting it to zero.
[schematic.backup] group [ 1.9.10 ]:
-
create-files[ 1.9.10 ]- type: boolean
- default value:
true - Enable the creation of backup files (
NAME.sch~) when saving a schematic.
[schematic.attrib] group [ 1.9.10 ]:
The first four parameters in this group replaces the deprecated options used
to be set in gafrc files.
-
- former
gafrcoption:attribute-promotion - type: boolean
- default value:
true - Set if attribute promotion occurs when you instantiate a component. Attribute promotion means that any floating (unattached) attribute which is inside a symbol gets attached to the newly inserted component when it is instantiated.
- former
-
- former
gafrcoption:always-promote-attributes - type: string list
- default value:
footprint;device;value;model-name - The list of attributes that are always promoted regardless of their visibility.
- former
-
- former
gafrcoption:promote-invisible - type: boolean
- default value:
false - Set if invisible floating attributes are promoted when a component is instantiated.
- former
-
- former
gafrcoption:keep-invisible - type: boolean
- default value:
true - Do not change this option. Here's the original description from
the
system-gafrcfile: "If bothattribute-promotionandpromote-invisibleare enabled, then this controls if invisible floating attributes are kept around in memory and NOT deleted. Having this enabled will keeps component slotting working. Ifattribute-promotionandpromote-invisibleare enabled and this keyword is disabled, then component slotting will NOT work (and maybe other functions which depend on hidden attributes, since those attributes are deleted from memory)."
- former
-
- type: string list
- default value:
netname;footprint;value;refdes;source;model-name; model;net;device;numslots;slot;slotdef;graphical; description;documentation;symversion;comment;author; dist-license;use-license;file - The list specifies attributes presented in the
Add attributeandEdit attributedialogs for symbols and nets. The attribute names are case sensitive. The order of the names in the list determines the order they are displayed.
Note: The attribute names from parent configuration contexts are not inherited and will be overridden by the child context value. If the user will specify, e.g.,foo;barhere, only these two names are displayed.
Note: For now thesymbol-attribsandpin-attribslists are displayed together, but this may change in future.
-
- type: string list
- default value:
pinnumber;pinseq;pintype;pinlabel - The list specifies attributes presented in the
Add attributeandEdit attributedialogs for pins. The attribute names are case sensitive. The order of the names in the list determines the order they are displayed.
Note: The attribute names from parent configuration contexts are not inherited and will be overridden by the child context value. If the user will specify, e.g.,foo;barhere, only these two names are displayed.
Note: For now thesymbol-attribsandpin-attribslists are displayed together, but this may change in future.
2. lepton-netlist
[gnetlist] ([netlist] [ 1.9.10 ]) group:
-
- type: string
- default value:
"unnamed_net" - Default name used for nets for which the user has set
no explicit name via the
netname=ornet=attributes.
-
- type: string
- default value:
"unnamed_bus" - Default name used for buses for which the user has set
no explicit name via the
netname=ornet=attributes.
-
- type: string
- default value:
net-attribute - values:
net-attribute,netname-attribute - Specify which attribute,
netornetname, has priority if a net is found with two names. Any netname conflict will be resolved using the chosen attribute.
[gnetlist.hierarchy] ([netlist.hierarchy] [ 1.9.10 ]) group:
-
- type: boolean
- default value:
true - Turn on/off hierarchy processing.
-
- type: boolean
- default value:
true - Whether to mangle sub-schematic's
refdesattributes.
-
- type: boolean
- default value:
false - While mangling
refdesattributes, whether to append (false) or prepend (true) sub-schematic's ones.
-
- type: string
- default value:
"/" - Separator string used to form mangled
refdesattribute names.
-
- type: boolean
- default value:
true - Whether to mangle sub-schematic's
netnameattributes.
-
- type: boolean
- default value:
false - While mangling
netnameattributes, whether to append (false) or prepend (true) sub-schematic's ones.
-
- type: string
- default value:
"/" - Separator string used to form mangled
netnameattribute names.
-
- type: boolean
- default value:
true - Whether to mangle sub-schematic's
netattributes.
-
- type: boolean
- default value:
false - While mangling
netattributes, whether to append (false) or prepend (true) sub-schematic's ones.
-
- type: string
- default value:
"/" - Separator string used to form mangled
netattribute names.
3. lepton-cli
The following settings controls the behaviour of lepton-cli utility
when it's invoked with the export command.
-
align- type: list of two doubles in the form
HALIGN;VALIGNor string"auto" - default value:
"auto" - Set how the drawing is aligned within the page.
HALIGNcontrols the horizontal alignment, andVALIGNthe vertical. Each alignment value should be in the range 0.0 to 1.0. The"auto"alignment is equivalent to a value of0.5;0.5, i.e. centered.
- type: list of two doubles in the form
-
dpi- type: integer
- default value:
96 - Set the number of pixels per inch used when generating
PNGoutput.
-
- type: string
- default value:
"Sans" - Set the font to be used for drawing text.
-
layout- type: string
- default value:
auto - values:
auto,portrait,landscape - When using a paper size, set the orientation of the output. If
"auto"layout is used, the orientation that best fits the drawing will be used.
-
margins- type: list of four integers in the form
TOP;LEFT;BOTTOM;RIGHT - default value:
18;18;18;18 - Set the widths of the margins to be used (the minimal distances from the sheet edges; actual margins may be larger if the sizes of the chosen paper do not meet the sizes of the printed schematic).
- type: list of four integers in the form
-
monochrome- type: boolean
- default value:
false - Toggle monochrome (
true) or color (false) output.
-
- type: string
- default value:
"iso_a4" - Size the output for a particular paper size.
The default value depends on the current locale.
Described in the PWG 5101.1 standard (Printer Working
Group "Media Standardized Names").
Examples:
iso_a4,iso_a5,na_letter.
-
size- type: list of two doubles in the form
WIDTH;HEIGHTor string"auto" - default value:
- Size the output with specific dimensions. If the size is
"auto", select the size that best fits the drawing. This overrides thepaperkey (see the previous entry).
- type: list of two doubles in the form