.. _config:
ZPUI configuration files
========================
ZPUI ``config.yaml``
++++++++++++++++++++++++
.. important::
If you're on one of the default devices (Beepy/Blepis/Colorberry/ZPUI businesscard/etc.)
or you're using an SD card image that comes with ZPUI, you don't necessarily have to edit the config file.
The ``config.py`` script sets a default config file for your device already.
Feel free to skip to the "Useful examples" section!
ZPUI depends on a ``config.yaml`` file to initialize the input and output devices.
If you're using an emulator, it expects a ``config.yaml`` in the local folder.
On non-emulator (real hardware) devices, it expects a YAML-formatted file, looking in one of the following paths
(sorted by order in which ZPUI attempts to load them):
* ``/boot/zpui_config.yaml``
* ``/boot/pylci_config.yaml``
* ``{ZPUI directory}/config.yaml``
* ``{ZPUI directory}/config.example.yaml`` (a fallback file that you shouldn't edit manually)
.. note::
The ``config.yaml`` tells ZPUI which output and input hardware it needs to use, so
invalid configuration might lock you out of the system. As such, if you're not using
the emulator, it might be better to copy the file into ``/boot/zpui_config.yaml``
and make your changes there - if you screw up and lock yourself out of ZPUI,
it's easier to revert the changes, since you can do it by just plugging your microSD
card in another computer and editing the file. You can also delete (or rename) the
file to make ZPUI fallback to the config file in the ZPUI directory.
.. note::
Also, scroll down to learn how to verify your config file after you've made changes!
ZPUI config format
-------------------
Here's how an average ZPUI config file will look like:
.. code:: yaml
device: DEVICE_NAME (for instance, emulator, beepy or blepis)
ui_color: "#00cafe" # can also use simple color names like "green"
Here's a config file, with a few extra input devices added:
.. code:: yaml
device: DEVICE_NAME (for instance, emulator, beepy or blepis)
input:
- blepis_lora_hat # extra input device, default settings
- driver: hid
name: HID 04d9:1603
Here's a config where output and input drivers are defined manually:
.. code:: yaml
output: sh1106
input:
- driver: hid
name: HID 04d9:1603
Documentation for :doc:`input ` and :doc:`output