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"
}
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": "",
// ...
}