# broadcast

Type text in all kitty windows simultaneously

The `broadcast` kitten can be used to type text simultaneously in all kitty windows (or a subset as desired).

To use it, simply create a mapping in `kitty.conf` such as:

    map F1 launch --allow-remote-control kitty +kitten broadcast

Then press the `F1` key and whatever you type in the newly created widow will be sent to all kitty windows.

You can use the options described below to control which windows are selected.

## Source code for broadcast

The source code for this kitten is available on GitHub.

## Command Line Interface

    kitty +kitten broadcast [options] [initial text to send ...]

Broadcast typed text to all kitty windows. By default text is sent to all windows, unless one of the matching options is specified

### Options

--match <MATCH>, -m <MATCH>

  The window to match. Match specifications are of the form: field:regexp. Where field can be one of: id, title, pid, cwd, cmdline, num, env. You can use the ls command to get a list of windows. Note that for numeric fields such as id, pid and num the expression is interpreted as a number, not a regular expression. The field num refers to the window position in the current tab, starting from zero and counting clockwise (this is the same as the order in which the windows are reported by the ls command). The window id of the current window is available as the KITTY_WINDOW_ID environment variable. When using the env field to match on environment variables you can specify only the environment variable name or a name and value, for example, env:MY_ENV_VAR=2

--match-tab <MATCH_TAB>, -t <MATCH_TAB>

  The tab to match. Match specifications are of the form: field:regexp. Where field can be one of: id, index, title, window_id, window_title, pid, cwd, env, cmdline. You can use the ls command to get a list of tabs. Note that for numeric fields such as id, index and pid the expression is interpreted as a number, not a regular expression. When using title or id, first a matching tab is looked for and if not found a matching window is looked for, and the tab for that window is used. You can also use window_id and window_title to match the tab that contains the window with the specified id or title. The index number is used to match the nth tab in the currently active OS window.