This document explains how to configure and customize layouts in xfetch.
The default layout displays the logo (ASCII or image) on the left and the system information modules on the right.
Configuration:
To use this layout, simply omit the layout key in your config or set it to null.
{
"layout": null,
// ...
}A structured layout where keys and values are displayed in two separate side-by-side boxes.
Configuration:
{
"layout": "side-block"
}Appearance:
╭──────────╮ ╭──────────────────────╮
│ User │ │ jan.rex │
│ Host │ │ DIO-LAPTOP │
╰──────────╯ ╰──────────────────────╯Displays modules in a hierarchical tree structure. This layout supports grouping modules.
Configuration:
{
"layout": "tree",
"modules": [
{
"type": "group",
"title": "OS",
"modules": ["os", "kernel", "packages"]
},
{
"type": "group",
"title": "PC",
"modules": ["cpu", "gpu", "memory"]
}
]
}Appearance:
OS
├── os Arch Linux
├── kernel 6.6.1
└── packages 1200 (pacman)
PC
├── cpu AMD Ryzen 9
└── memory 16 GiBDisplays modules in groups with clear section headers.
Configuration:
{
"layout": "section",
"modules": [
{
"type": "group",
"title": "Hardware",
"modules": ["cpu", "gpu", "memory"]
},
{
"type": "group",
"title": "Software",
"modules": ["os", "shell"]
}
]
}Appearance:
────── Hardware ──────
│ cpu: AMD Ryzen 9
│ memory: 16 GiB
────── Software ──────
│ os: Arch LinuxA boxed layout inspired by the Pac-Man game interface.
Configuration:
{
"layout": "pacman",
"header_icons": ["ᗧ", "●", "●", "●", "●"], // Icons for top border
"footer_text": "GAME OVER" // Text for bottom border
}Displays the system information enclosed in a simple box with rounded corners.
Configuration:
{
"layout": "box"
}Displays system information with a horizontal separator line after every 3 modules.
Configuration:
{
"layout": "line"
}Similar to the Line layout, but uses dots as separators.
Configuration:
{
"layout": "dots"
}A minimal layout that adds a single horizontal line at the very bottom of the information list.
Configuration:
{
"layout": "bottom_line"
}
Like section, but every group is drawn as its own box with a
title embedded in the top border. Nested groups render as boxes inside boxes.
Configuration:
{
"layout": "section-box",
"modules": [
{ "type": "group", "title": "Hardware", "modules": ["cpu", "gpu"] },
{ "type": "group", "title": "Software", "modules": ["os", "shell"] }
]
}Appearance:
╭─ Hardware ────────────╮
│ Apple M4 │
│ Apple M4 │
╰───────────────────────╯
╭─ Software ────────────╮
│ Darwin 26.5.2 │
╰───────────────────────╯
The most flexible layout: every border line is a literal template written in
the custom_x config object, with {fill} and
{title} placeholders, configurable width, internal dividers and
per-module boxes. See CUSTOM_X.md for the full
reference.
Configuration:
{
"layout": "custom-x",
"custom_x": {
"top": "╔═══════ XFETCH ═══════{fill}╗",
"bottom": "╚══════════════════════{fill}╝",
"left": "║",
"right": "║",
"fill": "═",
"padding": 1,
"width": "full",
"group_title": "╭─── {title} ───{fill}╮"
},
"modules": [
{ "type": "group", "title": "Hardware", "modules": ["cpu", "gpu"] }
]
}
Icon-to-value layout without row keys: every module renders as
icon value on a single line. Use show_keys or the
labels map in other layouts when you need the keys back.
Configuration:
{
"layout": "compact"
}Appearance:
Arch Linux x86_64
6.6.87.2-arch1-1
16 GiB / 32 GiB (50%)
Plain text output with no logo, borders or icons: one key: value
line per module (a module whose labels entry is empty prints
only its value). key_width still pads the keys so the values
align, and group titles render as -- Title -- separators.
Configuration:
{
"layout": "minimal",
"key_width": 10
}Appearance:
os: Arch Linux x86_64
kernel: 6.6.87.2-arch1-1
memory: 16 GiB / 32 GiB (50%)Stacks the logo above the module list instead of side by side. The content is rendered exactly like the classic layout; only the placement changes.
Configuration:
{
"layout": "horizontal"
}
Like horizontal, but the logo is printed below the module list
(useful when the terminal scrolls the fetch out of view).
Configuration:
{
"layout": "bottom"
}
For tree and section layouts, you can define groups in the modules list:
"modules": [
// Simple module
"uptime",
// Group
{
"type": "group",
"title": "Group Title",
"modules": [
"os",
"kernel"
// You can nest groups too!
]
}
]os: Operating Systemkernel: Kernel versionhostname: Hostnameuser: Current usernamedatetime: Current date and timeuptime: System uptimepackages: Package countshell: Current shellterminal: Current terminal emulatorwm: Window Manager / Desktop Environmentcpu: CPU informationgpu: GPU informationmemory: RAM usageswap: Swap usagedisk: Disk usagebattery: Battery statuslocal_ip: Local IP addresspalette: Color palette
We recommend using Nerd Fonts for icons to ensure they render correctly. You can customize icons in the icons section of your config file.
"icons": {
"os": "",
"cpu": "",
// ...
}