Files
LLeMbas-TTY/docs/config/lua/window-events/bell.md
T
Wez Furlong 2337c06c0f gui: new bell event for running lua when the bell is rung
This commit adjusts the the window event routing/queuing so that
a queued event can capture a pane_id other than the focused pane.

Since we only allow one queued instance of a given named event in a
window, a consequence of this is that multiple bell events coming
from different panes at the same time may race and the loser's
event will be dropped. We log a warning in that case.

refs: #3
2021-09-23 08:22:01 -07:00

777 B

bell

Since: nightly builds only

The bell event is emitted when the ASCII BEL sequence is emitted to a pane in the window.

Defining an event handler doesn't alter wezterm's handling of the bell; the event supplements it and allows you to take additional action over the configured behavior.

The first event parameter is a window object that represents the gui window.

The second event parameter is a pane object that represents the pane in which the bell was rung, which may not be active pane--it could be in an unfocused pane or tab..

local wezterm = require 'wezterm';

wezterm.on("bell", function(window, pane)
  wezterm.log_info("the bell was rung in pane " .. pane:pane_id() .. "!");
end)

return {}