Customization

August 27, 2026 ยท View on GitHub

Using the --gen-config flag you can generate a default config file which will most likely be stored in ~/.config/dfetch. If no config exists the builtin one will be used which you can not modify.

The configuration file contains two sections:

  • ascii - Controls the ASCII art displayed by Dfetch.
  • modules - Controls which modules are displayed in what way and how info is formatted.

ASCII

"ascii": {
    "enabled": true,
    "path": "builtin",
    "padding_top": 1,
    "padding_bottom": 1
}

This section controls whether ASCII art is displayed, which ASCII art is used (builtin, distro name, or a custom path), and the padding above and below it.

Modules

The modules array controls what Dfetch displays and in what order.

For example:

{
    "name": "cpu",
    "label": "CPU",
    "color": "green",
    "format": "{short}",
    "separator": ":"
}

displays the CPU module using its short name.

Available modules

ModuleDescription
userinfoUsername and hostname
osOperating system
kernelCurrent kernel
cpuProcessor information
memoryMemory usage
swapSwap usage
localipLocal IP address
localeSystem locale settings
uptimeSystem uptime
batteryBattery information
biosBIOS information
deDesktop environment
wmWindow manager
shellCurrent shell
terminalCurrent terminal
diskDisk usage
datetimeCurrent date and time
packagesInstalled packages
hostDevice model and motherboard
emptylineBlank line
textCustom text
colorTerminal color palette

Common options

OptionDescription
nameThe module that should be displayed
labelThe name displayed in output
colorColor of the label default is set based on the distro
separatorText separating the label and the information
formatControls how the module output is formatted
mountSets which mount point or filesystem should be displayed
textUsed by the text module to set custom text

Formatting

Module formatting uses {placeholder} syntax. Text outside of placeholders is preserved.

This is a list of the placeholders supported by every module:

userinfo

  • {username} - Current username
  • {hostname} - System hostname

os

  • {name} - Operating system name

kernel

  • {type} - Kernel type
  • {release} - Kernel release

cpu

  • {name} - Full CPU name
  • {short} - Simplified CPU name

memory

  • {memory} - Used memory and total memory
  • {used} - Used memory
  • {total} - Total memory
  • {percent} - Memory usage percentage
  • {unit} - The unit in which the rest is displayed

swap

  • {swap} - Used swap and total swap
  • {used} - Used swap
  • {total} - Total swap
  • {percent} - Swap usage percentage
  • {unit} - The unit in which the rest is displayed

local_ip

  • {ip} - IP address without prefix
  • {prefix} - subnet prefix
  • {address} - IP address with prefix

uptime

  • {uptime} - Formatted uptime (e.g. 2 days, 4 hours, 12 mins)
  • {centuries} - Number of complete centuries in the uptime
  • {years} - Number of complete years remaining after centuries
  • {months} - Number of complete 30-day months remaining after years
  • {weeks} - Number of complete weeks remaining after months
  • {days} - Number of complete days remaining after weeks
  • {hours} - Number of complete hours remaining after days
  • {minutes} - Number of complete minutes remaining after hours

battery

  • {percent} - Battery percentage
  • {status} - Battery status

bios

  • {bios} - Bios name

de

  • {de} - Desktop enviroment name
  • {version} - Version of the current DE

wm

  • {name} - Window manager name
  • {version} - Window manager version
  • {sessiontype} - Session type, such as x11 or wayland

shell

  • {name} - Shell name
  • {version} - Shell version

terminal

  • {name} - Terminal name
  • {version} - Terminal version

disk

  • {disk} - Used space and total space
  • {used} - Used space
  • {total} - Total space
  • {unit} - Storage unit
  • {percent} - Disk usage percentage

The mount option can be used to select which filesystem is measured.

datetime

  • {date} - Current date
  • {time} - Current time

packages

  • {packages} - Default formatted output
  • {total} - Total number of installed packages
  • {dpkg, pacman, apk, eopkg, rpm, snap, flatpak} - Total packages for specified package manager

host

  • {name} - Device model/family
  • {board} - Motherboard name

locale

  • {locale} - Language

Modules without formatting

These modules don't provide format placeholders:

  • text
  • emptyline
  • color

The text module uses the format option for custom text but does not support any placeholders.

Color in formatted information

Formatted information, such as

{disk} ({percent}%)

can be colored in the same way as ASCII art by providing color tags. For example, if we want to make the percent part of the information green, we can write:

{disk} ${green}({percent}%)

A list of supported colors can be found below.

mount

The mount option is only used by the disk module.

For example:

{
    "name": "disk",
    "mount": "/home",
    "format": "{used} / {total} {unit}"
}

displays disk usage for /home instead of /.

Custom ASCII art

To use custom ASCII art, create a text file containing your ASCII art.

You can optionally add color tags such as ${bright_blue} inside the file.

${bright_white}       _,met$$$$$gg.
${bright_white}   ,g$$$$$$$$$$$$$$$$P.
${bright_white} ,$$P'              `$$$.
${bright_white}',$$P       ,ggs.     `$$:
${bright_white}`d$$'     ,$P"'   ${bright_red}.    ${bright_white}$$$
${bright_white} $$P      d$'     ${bright_red},    ${bright_white}$$P
${bright_white} $$:      $$.   ${bright_red}-    ${bright_white},d$$'
${bright_white} $$;      Y$b._   _,d$P'
${bright_white} Y$$.    ${bright_red}`.${bright_white}`"Y$$$$P"'
${bright_white} `$$b      ${bright_red}"-.__
${bright_white}  `Y$$
${bright_white}   `Y$$.
${bright_white}     `$$b.
${bright_white}       `Y$$b.
${bright_white}          `"Y$b._

In the configuration file, change:

"path": "builtin"

to:

"path": "/path/to/ascii.txt"

to use the custom ASCII art.

Supported colors

ColorBright colorBold colorBright bold color
1 black9 bright_black17 bold_black25 bold_bright_black
2 red10 bright_red18 bold_red26 bold_bright_red
3 green11 bright_green19 bold_green27 bold_bright_green
4 yellow12 bright_yellow20 bold_yellow28 bold_bright_yellow
5 blue13 bright_blue21 bold_blue29 bold_bright_blue
6 magenta14 bright_magenta22 bold_magenta30 bold_bright_magenta
7 cyan15 bright_cyan23 bold_cyan31 bold_bright_cyan
8 white16 bright_white24 bold_white32 bold_bright_white

The number in front of a color can be used as a substitute for the color.