window-focus-changed
On this page
window-focus-changed#
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 wakterm; 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 wakterm = require 'wakterm'
wakterm.on('window-focus-changed', function(window, pane)
wakterm.log_info(
'the focus state of ',
window:window_id(),
' changed to ',
window:is_focused()
)
end)