Skip to content

A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.

668 B
Raw Blame

window:leader_is_active()

{{since('20220319-142410-0fcdea07')}}

Returns true if the Leader Key is active in the window, or false otherwise.

This example shows LEADER in the right status area, and turns the cursor orange, when the leader is active:

local wezterm = require 'wezterm'

wezterm.on('update-right-status', function(window, pane)
  local leader = ''
  if window:leader_is_active() then
    leader = 'LEADER'
  end
  window:set_right_status(leader)
end)

return {
  leader = { key = 'a', mods = 'CTRL' },
  colors = {
    compose_cursor = 'orange',
  },
}

See also: window:composition_status().