-
- Notifications
You must be signed in to change notification settings - Fork 597
Configuration
This document provides comprehensive guidance on configuring Fastfetch to suit your needs.
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:
fastfetch --gen-config
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.
The configuration file has the following main sections:
Configure how the logo appears:
"logo": { "type": "auto", // Logo type: auto, builtin, small, file, etc. "source": "arch", // Built-in logo name or file path "width": 65, // Width in characters "height": 35, // Height in characters "padding": { "top": 0, // Top padding "left": 0, // Left padding "right": 2 // Right padding }, "color": { // Override logo colors "1": "blue", "2": "green" } }
Control how information is displayed:
"display": { "separator": ": ", // Separator between keys and values "color": { "keys": "blue", // Key color "title": "red" // Title color }, "key": { "width": 12, // Aligns keys to this width "type": "string" // string, icon, both, or none }, "bar": { "width": 10, // Width of percentage bars "char": { "elapsed": "■", // Character for elapsed portion "total": "-", // Character for total portion }, }, "percent": { "type": 9, // 1=number, 2=bar, 3=both, 9=colored number "color": { "green": "green", "yellow": "light_yellow", "red": "light_red" } } }
Specify which modules to display and their configuration:
"modules": [ "title", "separator", { "type": "os", "key": "OS", "keyColor": "blue", "format": "{name} {version}" }, { "type": "kernel", "key": "Kernel" }, { "type": "memory", "key": "Memory", "percent": { "type": 3, // Show both percentage number and bar "green": 30, // Values below 30% in green "yellow": 70 // 30-70% in yellow, >70% in red } } ]
Many modules support custom format strings. For example:
{ "type": "cpu", "format": "{name} ({cores-physical}C/{cores-logical}T) @ {freq-max}" }
Use fastfetch -h <module>-format
to see available format options for each module.
-
Start with a preset: Use
fastfetch --config examples/X
to start with a minimal configuration and build from there. -
Use JSON schema: Adding the
$schema
line enables code completion and validation in editors like VSCode.
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.
*.jsonc
in https://github.com/fastfetch-cli/fastfetch/tree/dev/presets/examples
You may test it with fastfetch --config examples/x.jsonc
- Special charactors should be encoded as
\uXXXX
in JSON. Notably,\e
or\033
should be\u001b
.