Difference between revisions of "Common configuration files"
Jump to navigation
Jump to search
(Created page with "This page sketches out a design for configuration files that can be read from and written to by libsigrok, and used by various frontends. * All applications should take -C ar...") |
m (add decoder setting idea) |
||
Line 14: | Line 14: | ||
** Put here only by apps that can do something like "save config", "remember settings" -- and only if the user specifically selects such a function. | ** Put here only by apps that can do something like "save config", "remember settings" -- and only if the user specifically selects such a function. | ||
* Store last used settings in [last] section. | * Store last used settings in [last] section. | ||
* Can store decoder settings. | |||
* Keys are sr_config_info id string. | * Keys are sr_config_info id string. | ||
* Example settings: | * Example settings: |
Latest revision as of 06:03, 9 March 2014
This page sketches out a design for configuration files that can be read from and written to by libsigrok, and used by various frontends.
- All applications should take -C argument.
- If filename, load config from filename.
- Else load standard config file and use argument as section name.
- Use default $XDG_CONFIG_HOME/sigrok or ~/.config/sigrok config directory
- Syntax GKeyFile:
- [sections]
- # comments
- key = value
- liberal with whitespace,
- <application>.conf
- Store fixed settings in [default] section.
- Put here only by apps that can do something like "save config", "remember settings" -- and only if the user specifically selects such a function.
- Store last used settings in [last] section.
- Can store decoder settings.
- Keys are sr_config_info id string.
- Example settings:
driver = atten-pps3xxx conn = /dev/ttyUSB1 ocp = on output_channel = independent output_voltage_max[CH1] = 12.00 output_current_max[CH1] = 0.020 output_enabled[CH1] = yes