FTB Configuration Guide

July 11, 2026 · View on GitHub

中文文档 | English

FTB Configuration Guide

FTB v2.1.1 uses a JSON configuration file to customize appearance and behavior.

File Location

  • Default: ~/.config/ftb/ftb.json
  • Custom path: FTB --config /path/to/config.json
  • Template: config/.ftb.template

If the config file does not exist at startup, FTB creates one with default values.

Quick Start

cp config/.ftb.template ~/.config/ftb/ftb.json
# Edit with any text editor

Configuration Sections

Colors

All color values support hex format (#RRGGBB) and named terminal colors.

Main Interface (colors.main)

{
  "colors": {
    "main": {
      "background": "#1e1e2e",
      "foreground": "#cdd6f4",
      "border": "#45475a",
      "selection_bg": "#585b70",
      "selection_fg": "#cdd6f4"
    }
  }
}
FieldDescription
backgroundMain background color
foregroundDefault text color
borderBorder and separator color
selection_bgSelected item background
selection_fgSelected item text color

File Type Colors (colors.files)

{
  "colors": {
    "files": {
      "directory": "#89b4fa",
      "file": "#cdd6f4",
      "executable": "#a6e3a1",
      "link": "#f5c2e7",
      "hidden": "#6c7086",
      "system": "#f38ba8",
      "extensions": {
        "cpp": "#a6e3a1",
        "hpp": "#a6e3a1",
        "py": "#89b4fa",
        "js": "#f5c2e7",
        "ts": "#f5c2e7",
        "md": "#89b4fa",
        "txt": "#6c7086",
        "toml": "#6c7086",
        "json": "#f9e2af",
        "yaml": "#f9e2af",
        "yml": "#f9e2af",
        "png": "#f38ba8",
        "jpg": "#f38ba8",
        "jpeg": "#f38ba8",
        "gif": "#f38ba8",
        "svg": "#f38ba8",
        "zip": "#f5c2e7",
        "tar": "#f5c2e7",
        "gz": "#f5c2e7"
      }
    }
  }
}
FieldDescription
directoryDirectory names
fileRegular files
executableExecutable files
linkSymbolic links
hiddenHidden files (starting with .)
systemSystem files
extensionsExtension-to-color map (overrides categories for matching files)

Syntax Highlighting Colors (colors.syntax)

{
  "colors": {
    "syntax": {
      "keyword": "#cba6f7",
      "string": "#a6e3a1",
      "comment": "#6c7086",
      "number": "#fab387",
      "function": "#89b4fa",
      "type": "#f9e2af",
      "operator": "#89dceb",
      "preprocessor": "#f38ba8",
      "identifier": "#cdd6f4",
      "punctuation": "#6c7086",
      "property": "#89dceb",
      "tag": "#cba6f7",
      "attribute": "#f9e2af",
      "regex": "#fab387",
      "decorator": "#f38ba8",
      "line_number": "#585b70"
    }
  }
}
FieldDescription
keywordLanguage keywords (if, for, class, etc.)
stringString literals
commentComments
numberNumeric literals
functionFunction names
typeType names
operatorOperators (+, -, ==, etc.)
preprocessorPreprocessor directives (#include, #define)
identifierGeneral identifiers
punctuationBrackets, commas, semicolons
propertyObject properties / fields
tagHTML/XML tags
attributeHTML/XML attributes
regexRegular expressions
decoratorDecorators / annotations
line_numberLine numbers in preview

Status Bar (colors.status)

{
  "colors": {
    "status": {
      "background": "#313244",
      "foreground": "#cdd6f4",
      "border": "#45475a"
    }
  }
}

Search (colors.search)

{
  "colors": {
    "search": {
      "background": "#1e1e2e",
      "foreground": "#cdd6f4",
      "border": "#89b4fa"
    }
  }
}

Dialog (colors.dialog)

{
  "colors": {
    "dialog": {
      "background": "#1e1e2e",
      "foreground": "#cdd6f4",
      "border": "#89b4fa"
    }
  }
}

Status Bar (statusbar)

{
  "statusbar": {
    "style": "powerline",
    "show_position": true,
    "show_time": true,
    "show_clipboard": true,
    "use_bold": false
  }
}
FieldTypeDefaultDescription
stylestring"powerline"One of: powerline, rounded, thin, arrow, bar, minimal
show_positionbooltrueShow selected/total position
show_timebooltrueShow current time
show_clipboardbooltrueShow clipboard pending paste count
use_boldboolfalseUse bold text in status bar

Style (style)

{
  "style": {
    "show_icons": true,
    "show_file_size": true,
    "show_modified_time": true,
    "show_permissions": true,
    "enable_mouse": true,
    "enable_animations": false,
    "show_hidden_files": false,
    "show_detail_panel": true,
    "sort_mode": "name_asc"
  }
}
FieldTypeDefaultDescription
show_iconsbooltrueShow Nerd Font file icons (requires patched font)
show_file_sizebooltrueShow file sizes
show_modified_timebooltrueShow modification timestamps
show_permissionsbooltrueShow file permissions
enable_mousebooltrueEnable mouse support
enable_animationsboolfalseEnable UI animations
show_hidden_filesboolfalseShow hidden files (starting with .)
show_detail_panelbooltrueShow the preview panel
sort_modestring"name_asc"Sort mode: name_asc, name_desc, size_asc, size_desc, time_asc, time_desc, ext_asc, ext_desc

Layout (layout)

{
  "layout": {
    "parent_ratio": 0.222,
    "current_ratio": 0.444,
    "preview_ratio": 0.333,
    "items_per_page": 0
  }
}
FieldTypeDefaultDescription
parent_ratiodouble0.222Parent column width ratio (0.0 - 1.0)
current_ratiodouble0.444Current directory column width ratio
preview_ratiodouble0.333Preview panel width ratio
items_per_pageint0Items per page (0 = auto based on terminal height)

Ratios are normalized to sum to 1.0 automatically.

UI (ui)

{
  "ui": {
    "column_separator": "thin",
    "panel_border": "rounded",
    "selection_style": "full",
    "tab_bar_style": "modern"
  }
}
FieldTypeDefaultValues
column_separatorstring"thin"thin, light, heavy, double, dotted, dashed, none
panel_borderstring"rounded"rounded, sharp, double, heavy, none
selection_stylestring"full"full, underline, invert, bar, minimal
tab_bar_stylestring"modern"modern, classic

Refresh (refresh)

{
  "refresh": {
    "ui_refresh_interval_ms": 100,
    "content_refresh_interval_ms": 1000,
    "auto_refresh": true
  }
}
FieldTypeDefaultDescription
ui_refresh_interval_msint100UI refresh interval in milliseconds
content_refresh_interval_msint1000Directory content refresh interval
auto_refreshbooltrueAuto-refresh directory contents

Theme (theme)

{
  "theme": {
    "name": "default",
    "use_bold": false,
    "use_underline": false
  }
}
FieldTypeDefaultDescription
namestring"default"Theme name (50+ themes available)
use_boldboolfalseUse bold text
use_underlineboolfalseUse underlined text

Available themes: default, yazi, dark, light, colorful, minimal, dracula, nord, tokyo-night, gruvbox, solarized, one-dark, rose-pine, kanagawa, everforest, monokai, ayu, poimandres, material, horizon, melange, solarized-light, macchiato, github, synthwave, nightfox, tokyo-storm, rose-pine-dawn, gruvbox-light, oxocarbon, ayu-mirage, everforest-light, andromeda, frappe, doom-one, outrun, falcon, vscode, moonfly, tomorrow-night, zenburn, latte, palenight, monokai-pro, flexoki, one-light, nord-light, challenger, cobalt2, iceberg and more.

When a theme is set, its colors override the colors section. Custom colors in the colors section take effect when theme.name is not set or when you override specific fields after setting a theme.

SSH (ssh)

{
  "ssh": {
    "default_port": 22,
    "connection_timeout": 30,
    "save_connection_history": true,
    "max_connection_history": 10
  }
}
FieldTypeDefaultDescription
default_portint22Default SSH port
connection_timeoutint30Connection timeout in seconds
save_connection_historybooltrueSave connection history
max_connection_historyint10Maximum saved connections

Logging (logging)

{
  "logging": {
    "level": "info",
    "output_to_file": false,
    "log_file": "~/.config/ftb/ftb.log",
    "show_timestamp": true
  }
}
FieldTypeDefaultDescription
levelstring"info"Log level (info, debug, warn, error)
output_to_fileboolfalseWrite logs to file
log_filestring"~/.config/ftb/ftb.log"Log file path
show_timestampbooltrueInclude timestamps in logs

Preview (preview)

{
  "preview": {
    "max_text_file_size_kb": 0,
    "max_text_lines": 0,
    "max_dir_entries": 0,
    "max_hex_bytes": 0,
    "max_archive_nodes": 0,
    "max_spreadsheet_rows": 0,
    "truncate_long_lines": true,
    "chunk_size_lines": 200,
    "virtual_scroll_margin": 50
  }
}
FieldTypeDefaultDescription
max_text_file_size_kbint0Max text file size for preview (0 = no limit)
max_text_linesint0Max lines for text preview (0 = no limit)
max_dir_entriesint0Max directory entries to show (0 = no limit)
max_hex_bytesint0Max bytes for hex dump (0 = no limit)
max_archive_nodesint0Max archive entries to show (0 = no limit)
max_spreadsheet_rowsint0Max spreadsheet rows (0 = no limit)
truncate_long_linesbooltrueTruncate lines exceeding panel width
chunk_size_linesint200Lines per chunk for lazy text loading
virtual_scroll_marginint50Extra lines to preload above/below viewport

Bookmarks (bookmarks)

{
  "bookmarks": {
    "home": "~",
    "root": "/",
    "tmp": "/tmp"
  }
}

Named directory bookmarks. Jump to a bookmark using the :jump command (Ctrl+B j).

Opener (opener)

{
  "opener": {
    "openers": {
      "edit": [{"run": "", "block": true, "desc": "Built-in editor"}],
      "open": [
        {"run": "xdg-open %s", "orphan": true, "desc": "System default", "platform": "linux"},
        {"run": "open %s", "orphan": true, "desc": "System default", "platform": "macos"}
      ]
    },
    "rules": [
      {"name": "*", "use": ["open"]}
    ]
  }
}
FieldDescription
openersDefine opener programs (edit, open, etc.)
rulesMap file patterns to opener lists

The * wildcard rule matches all files. Rules are evaluated in order; the first match wins.

No-Preview Extensions

Extensions listed in config/noavilable.json are excluded from preview:

{
    "no_preview_extensions": [
        ".unitypackage"
    ]
}

Hot Reload

Press Ctrl+R to reload the configuration file without restarting FTB.

CLI Arguments

ArgumentDescription
-h, --helpShow help
-v, --versionShow version (v2.1.1)
--config <PATH>Specify config file path
--no-iconsBuild-time option: rebuild with -DFTB_ENABLE_ICONS=OFF
-lEnable performance debug logging to ftb_perf.log
[DIRECTORY]Startup directory

Color Format

Supported color formats:

  • Hex: "#RRGGBB" (e.g., "#89b4fa")
  • Named: Terminal color names (e.g., "black", "red", "blue", "white", etc.)
  • Bright variants: "bright_black", "bright_red", etc.

See also: Keyboard Shortcuts | 中文