FETCHA CONFIGURATION(5)

NAME
Config type - suckless-like, config in C file.

DESCRIPTION
The config.def.h file contains the default settings for fetcha. On startup:

•   if config.h does not exist, it is created by copying config.def.h;

•   if config.h exists, it is read directly.

  NOTE
#include "modules.h" - required for using modules in configuration.
#include <stdio.h> - required for the size_t type in config_items_len.

OPTIONS
The configuration file is a C source file, so you can use all C features. Configuration variables are usually declared as static const. The value 1 means True, and 0 means False. Variables are aligned by the assignment operator =.

    Example:
        static const int ascii_pad          = 10;
        static const int color_palette_show = 1;

ascii_pad
    Padding between ASCII art and information (in characters).

info_align (0/1)
    Align information by separator.

    Example:
        OS    : Arch Linux x86_64
        Kernel: 6.15.4-arch2-1

header_show (0/1)
    Show header or not.

    Header format:
        brace@archlinux
        ===============

color_palette_show (0/1)
    Show color palette with terminal colors below system information.

info_sep
    Separator between label and system info.

numerate_same (0/1)
    Enumerate fields of which there may be multiple instances.

    Example (1):
        GPU1 : Intel UHD Graphics
        GPU2 : NVIDIA GeForce GTX 1650 Mobile / Max-Q

    Example (0):
        GPU  : Intel UHD Graphics
        GPU  : NVIDIA GeForce GTX 1650 Mobile / Max-Q

colors[10]
    Array of 10 colors used by fetcha.

    Default palette:
        [0/2-4/9] - secondary colors (for ASCII)
        1         - label and username color
        5         - info text
        6         - info separator
        7         - header separator
        8         - boundary

boundary_char
    String used as a boundary between header and info.

    NOTE:
        boundary length = (username.len + header_sep.len + hostname.len) * boundary_char.len

header_sep
    Separator between username and hostname in the header.

config_items
    An array of info_item that defines which information is printed in the fetch. Each element consists of a label and a function that returns an allocated char *.

    { <label>, <func> }

config_items_len
    Constant that stores the length of config_items. Helps when developing modules.

ascii_art
    String printed before system information, usually ASCII art.

    NOTE:
        This string supports colors. Syntax: $ followed by a color index from colors[] (0-9).

FILES

config.def.h
    File containing default configuration.

config.h
    User configuration file.

SEE ALSO
fetcha(1)