wezterm.target_triple

This constant is set to the Rust target triple for the platform on which wezterm was built. This can be useful when you wish to conditionally adjust your configuration based on the platform.

local wezterm = require 'wezterm';

if wezterm.target_triple == "x86_64-pc-windows-msvc" then
  -- We are running on Windows; maybe we emit different
  -- key assignments here?
end

The most common triples are:

  • x86_64-pc-windows-msvc - Windows
  • x86_64-apple-darwin - macOS
  • x86_64-unknown-linux-gnu - Linux