Configuring Triad🔗

Triad uses the KDL configuration format. Edit your configuration at $XDG_CONFIG_HOME/triad/config.kdl (defaulting to ~/.config/triad/config.kdl). Triad provides a default configuration on first start.

For real-world examples, see the example configs in the repository.

Basics🔗

Command Line Overrides🔗

Use the --config (or -c) flag to test a specific configuration:

triad --config /path/to/my-config.kdl

Validation🔗

Check your configuration syntax without launching the daemon:

triad validate-config

Hot Reloading🔗

Triad watches your configuration and reloads instantly when you save, including any files added via the include directive.

Modular Configuration🔗

Split your configuration into multiple files:

include "bindings.kdl"
include optional=#true "~/.config/triad/local.kdl"

Paths are relative to the including file. Use ~/ for your home directory.


Naming Philosophy🔗

Triad configuration uses clear, descriptive names:

  • Descriptive: center-focused-column instead of cfc.
  • Verbose: split-ratio instead of mfact.
  • Positive: open-floating instead of isfloating.
  • Action-oriented: Verbs for commands (e.g., maximize-column, move-window-left).
  • Lowercase kebab-case: Used throughout.

Environment & Startup🔗

Environment Variables🔗

Set variables for processes Triad starts using the environment block.

Variable NameValueDescription
NAME"Value"Sets a string value.
NAME#nullRemoves the variable.

Note: Use literal paths; Triad does not expand variables like $HOME.

Startup Commands🔗

Run commands automatically at startup using spawn-at-startup.

spawn-at-startup "waybar"
spawn-at-startup "nm-applet" "--indicator"

Shell & Bar Profiles🔗

For shell and bar configuration — profiles, Waybar, Quickshell, Noctalia, niri-compat — see Shell Setup.


Layout🔗

The Layout Block🔗

Control window geometry and behavior.

SettingFormatDescription
gapsPixelsGaps around windows (0..512).
center-focused-column"never", "always", "on-overflow"How to position the active scroller column.
scroller-focus-centerBoolKeeps focus at screen center while scrolling.
scroller-prefer-centerBoolAttempts to center columns even when not focused.
scroller-proportion-presetsFloat...Presets for switch-proportion-preset (0.05..1.0).
default-column-widthBlockDefault width for new columns.
default-window-widthBlockDefault width for new windows.
default-window-heightBlockDefault height for new windows.
masterBlockConfigure count and split-ratio (0.05..0.95).
spiralBlockConfigure ratio, main-pane-ratio, main-pane, and clockwise.
borderBlockGlobal width (0..64), active-color, and inactive-color.
frame-tabsBlockColors for frame-tree tabs and empty frames.
smart-gapsBoolRemove gaps when only one window is visible.
enable-animationsBoolToggle viewport animations.
animation-speed0.0..1.0Speed of camera movement (0.0 is instant).
frame-rate"auto" / IntTargeted FPS (24..240, default: "auto").
layout-cycleListBuilt-in or Janet layout IDs to rotate through.

Native i3 layouts support i3-style container modes. The default bindings scope i3 commands to layout "i3". Use Super+Alt+h/v to split, and Super+e/s/w to select split, stacking, or tabbed modes.

Example Layout Configuration:

layout {
  gaps 16
  center-focused-column "on-overflow"
  default-column-width { proportion 0.5; }
  
  border {
    width 2
    active-color "#7fc8ff"
    inactive-color "#505050"
  }

  frame-tabs {
    active-color "#3f7fd5"
    inactive-color "#161a22ee"
    active-line-color "#ffffff"
  }
}

For workspace configuration — naming, pinning, dynamic creation — see Workspaces. For monitor output setup, see Monitors.


Window Rules🔗

Declare how windows behave on open — floating state, placement, target workspace. See Window Rules.


Input🔗

Configure keyboards (XKB layout, repeat rate), touchpads, mice, and cursor theme. See Input.


Key Bindings🔗

Bind keyboard shortcuts, mouse buttons, scroll axes, and gestures. See Key Bindings.


Native Features🔗

Recent windows (MRU switcher). Cycle through recently used windows with recent-window-next / recent-window-prev. Confirm with recent-window-confirm or cancel with recent-window-cancel.

Hotkey overlay. A live guide to your current bindings. Bind toggle-hotkey-overlay to show it on demand.

Scratchpads. Hidden window pools you toggle as floating overlays. See Scratchpads.

Overview. A zoomed-out strip of all workspaces. See Overview.


Janet Scripting🔗

Enable the embedded Janet runtime for event-driven placement and custom layouts:

janet {
  enabled #true
  automation-dir "~/.config/triad/automation"
  layout-dir     "~/.config/triad/layouts"
}

See Janet Scripting.


Config Notifications🔗

Run a command when the config reloads:

config-notification {
  reload-succeeded "notify-send" "Triad" "Config reloaded."
  reload-failed    "notify-send" "Triad" "Config error — check the log."
}