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, Noctalia, Waylee, 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-tabsBlockShared colors for frame-tree/notion tabs and i3 tabbed/stacking containers; also controls empty frame backgrounds.
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 (Switcher)🔗

Cycle through recently used windows with native previews.

SettingFormatDescription
enabledBoolToggle the MRU switcher.
debounce-msmsTime a window must remain focused to be recorded in history.
open-delay-msmsDelay before the switcher overlay appears.
highlightBlockConfigure active-color, urgent-color, padding, and corner-radius.
previewsBlockConfigure max-height (Pixels) and max-scale (0.01..1.0).

Hotkey overlay. A live guide to your current bindings.

SettingFormatDescription
skip-at-startupBoolDo not show the overlay automatically at startup.
hide-not-boundBoolOnly show rows with an active keybinding.
position"top", "center", "bottom"Vertical placement on screen.
columnsIntNumber of columns to display (1..4).

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

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


System Tools🔗

Terminal & Screen Lock🔗

Configure the default terminal and screen locker.

terminal {
  command "kitty"
}

screen-lock {
  command "swaylock" "-c" "000000"
}

Window Menu🔗

Configure the command for window menu requests.

window-menu-command "wmenu"

Screenshot🔗

Configure native screenshot behavior and external tools.

SettingFormatDescription
directoryStringWhere to save screenshots (supports ~/).
filename-prefixStringPrefix for generated filenames.
capture-commandStringTool for full-screen capture (e.g. grim).
region-selector-commandStringTool for region selection (e.g. slurp).
clipboard-commandStringTool for clipboard copy (e.g. wl-copy).
show-pointerBoolInclude the mouse pointer in captures.

Example Screenshot Configuration:

screenshot {
  directory "~/Pictures/Screenshots"
  filename-prefix "triad-cap-"
  capture-command "grim"
  region-selector-command "slurp"
  clipboard-command "wl-copy"
  show-pointer #false
}

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."
}