vcom/vcom.toml
vrubelroman 28fd86b8d5 feat(config): non-fatal loading with warnings and in-place SetKey (2C.2)
Load finds the file through paths (no ./vcom.toml), returns defaults plus an
error for a broken file instead of exiting, warns about unknown and
deprecated keys (strict second pass), resets invalid values with a warning,
and aliases center_width_percent to ui.preview_width_percent. New keys from
design §9.2 get defaults. SetKey edits one line keeping comments, order and
unknown keys, appends missing keys/sections, creates the XDG file, refuses
a file that does not parse and verifies the result before an atomic write.
The old UI shows config errors in the status line and survives an unknown
theme name; the reference vcom.toml is documented and current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 23:35:23 +03:00

60 lines
1.6 KiB
TOML

# vcom reference configuration.
# Copy to ~/.config/vcom/vcom.toml (or $XDG_CONFIG_HOME/vcom/vcom.toml) and edit.
# Every key is optional; missing keys keep their defaults.
[startup]
# Start directories; empty means the home directory (a saved session wins).
left_path = ''
right_path = ''
[ui]
# Theme name; `t` in vcom opens the selector and rewrites only this line.
theme = 'github-dark'
icon_mode = 'auto' # auto | nerd | ascii
show_footer = true
border = 'rounded'
path_display = 'smart'
pane_gap = 1 # 0..4
preview_width_percent = 50 # preview width in the Info screen, 20..80
[browser]
show_hidden = true
dirs_first = true
human_readable_size = true
[browser.sort]
by = 'name' # name | modified | size | created | extension
reverse = false
[browser.columns]
name = true
size = true
modified = true
created = false # birth time; computed only when this column is on
permissions = false
extension = false
[preview]
show_metadata = true
wrap_text = false
max_preview_bytes = 65536
directory_preview_limit = 80
image_backend = 'auto' # auto | kitty | ueberzugpp | none
max_remote_image_bytes = 20971520
[behavior]
confirm_delete = true # ask before moving to the trash
confirm_overwrite = true
calculate_dir_size_on_space = true
follow_symlinks = false # default of "follow links" in the copy dialog
confirm_quit = true
[transfer]
on_conflict = 'ask' # ask | overwrite | skip | newer | rename
preserve = true # keep permissions and modification times
fsync = 'replace' # replace | always | never
max_parallel_jobs = 2
[ssh]
keepalive_interval = '15s'
connect_timeout = '20s'