Configuration

This document provides comprehensive guidance on configuring Fastfetch to suit your needs.

Basic Configuration

Fastfetch uses JSONC (JSON with comments) for configuration. The default configuration file is located at ~/.config/fastfetch/config.jsonc

You can generate a minimal configuration file using:

If you prefer a full configuration file with all default options available:

fastfetch --gen-config-full

Using an editor with JSON schema support is highly suggested. If unsure, I suggest using vscode or helix.

Configuration Structure

The configuration file has the following main sections:

Logo Configuration

Configure how the logo appears:

Display Configuration

Control how information is displayed:

Module Configuration

Specify which modules to display and their configuration:

Format Strings

Many modules support custom format strings. For example:

Use fastfetch -h <module>-format to see available format options for each module.

Tips for Better Configuration

  1. Start with a preset: Use fastfetch --config examples/X to start with a minimal configuration and build from there.

  2. Use JSON schema: Adding the $schema line enables code completion and validation in editors like VSCode.

Documentation

Refer to: https://gitlab.com/CarterLi/fastfetch/-/wikis/Json-Schema (Gitlab link is used because of Github Wiki limitation)

Generated using json-schema-for-humans with

generate-schema-doc ~/fastfetch/doc/json_schema.json --config template_name=md Json-Schema.md

Also refer to fastfetch --help for more detailed explanation.

Examples

*.jsonc in https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples

You may test it with fastfetch --config examples/x.jsonc

Notes

  • Special charactors should be encoded as \uXXXX in JSON. Notably, \e or \033 should be \u001b.