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.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
window-focus-changed
{{since('20221119-145034-49b9839f')}}
The window-focus-changed event is emitted when the focus state for a window
is changed.
This event is fire-and-forget from the perspective of wezterm; it fires the event to advise of the config change, but has no other expectations.
The first event parameter is a window object that
represents the gui window.
The second event parameter is a pane object that
represents the active pane in that window.
local wezterm = require 'wezterm'
wezterm.on('window-focus-changed', function(window, pane)
wezterm.log_info(
'the focus state of ',
window:window_id(),
' changed to ',
window:is_focused()
)
end)