par-term-config 0.14.4

Configuration system for par-term terminal emulator
Documentation

par-term-config

Configuration system for the par-term terminal emulator.

This crate defines all configuration types, loading, saving, and default values used across the par-term workspace. It is the foundation crate (Layer 1) that all other workspace crates depend on.

What This Crate Provides

  • Config struct — the main configuration struct with 200+ fields covering fonts, rendering, colors, keybindings, automation, and more
  • Theme and color scheme types
  • Shader configuration and metadata types
  • Snippet and custom action configuration
  • Automation trigger and coprocess configuration
  • Profile configuration types
  • Status bar widget configuration
  • Scrollback mark types
  • Configuration file watching (behind the watcher feature flag)
  • Cell type shared between terminal and renderer crates
  • Shell detection for profile shell selection

Configuration File Location

Platform Path
Linux / macOS ~/.config/par-term/config.yaml
Windows %APPDATA%\par-term\config.yaml

All fields are optional. Omitting a field uses its documented default value. See docs/CONFIG_REFERENCE.md for the complete reference.

Environment Variable Substitution

String config values support ${VAR} substitution. By default, only a safe allowlist of variables is substituted (HOME, USER, SHELL, XDG_, PAR_TERM_, LC_*). Set allow_all_env_vars: true in your config to allow all environment variables.

Feature Flags

Flag Description
watcher Enables notify-based config file watching for hot reload

Installation

cargo add par-term-config

The default feature set includes watcher (notify-based config hot reload). Disable it with --no-default-features if you only need the data types.

Usage

use par_term_config::Config;

let config = Config::load()?;
println!("Font: {} ({})", config.font_family, config.font_size);
println!("Theme: {}", config.theme_colors.theme);
config.save()?;

Workspace Position

Layer 1 in the dependency graph. All Layer 2 and higher crates depend on this crate.

Related Documentation