theme.toml file controls Yazi’s visual appearance including colors, text styles, and icons.
File Location
- Unix-like systems:
~/.config/yazi/theme.toml - Windows:
%AppData%\yazi\config\theme.toml
Dark and Light Themes
Yazi automatically loads different default themes based on your terminal’s color mode:- Dark mode:
theme-dark.tomlis used as the base - Light mode:
theme-light.tomlis used as the base
theme.toml overrides settings in both default themes.
Flavors for Advanced Theming
For more granular control over light and dark modes, use flavors:~/.config/yazi/flavors/.
Style Syntax
Styles are defined using TOML tables with the following fields:boolean
Bold text when
trueboolean
Italic text when
trueboolean
Underlined text when
trueboolean
Swap foreground and background colors when
trueColors
Colors can be specified as:- Named colors:
black,red,green,yellow,blue,magenta,cyan,white,gray - Light variants:
lightred,lightgreen,lightyellow,lightblue,lightmagenta,lightcyan - Dark variants:
darkgray,darkred,darkgreen,darkyellow,darkblue,darkmagenta,darkcyan - RGB hex:
#RRGGBB(e.g.,#ff0000for red) - Special:
resetto use terminal default
Example Styles
Configuration Sections
[flavor] - Theme Flavors
[app] - Overall App Style
[mgr] - File Manager
[tabs] - Tab Bar
[mode] - Mode Indicator
[indicator] - File Indicator
[status] - Status Bar
[which] - Which-Key Popup
[confirm] - Confirmation Dialog
[spot] - File Details Spotter
[notify] - Notifications
[pick] - Picker Dialog
[input] - Input Dialog
[cmp] - Completion Popup
[tasks] - Task Manager
[help] - Help Menu
[filetype] - File Type Colors
Define colors for different file types:mime- Match by MIME type patternurl- Match by URL patternis- Match by file property:orphan,exec,dummy,link,block,char,fifo,sock,stickyfg- Foreground colorbg- Background color
[icon] - File and Folder Icons
Define custom icons for files and folders:if field):
dir- Directoriesexec- Executable fileslink- Symbolic linksorphan- Broken symlinksblock- Block deviceschar- Character devicesfifo- Named pipessock- Socketssticky- Files with sticky bitdummy- Dummy files!dir- Non-directories (fallback)
Complete Example
Tips
Using Nerd Fonts
Many icon glyphs require Nerd Fonts. Make sure your terminal uses a Nerd Font to display icons correctly.Color Schemes
Popular color schemes for Yazi:- Catppuccin: Soothing pastel theme
- Tokyo Night: Dark theme inspired by Tokyo’s night
- Nord: Arctic, north-bluish color palette
- Gruvbox: Retro groove color scheme
Testing Colors
To test your theme changes:- Save your
theme.toml - Reload Yazi (or restart it)
- Check the appearance
- Iterate on colors until satisfied