diff --git a/docs/glossary.rst b/docs/glossary.rst index 0b7c76ecd..aaf333bd5 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -33,3 +33,73 @@ Glossary throught kitty, for example, to display the :ref:`the scrollback buffer `, to display :doc:`hints `, for :doc:`unicode input ` etc. + + +Environment variables +------------------------ + +Variables that influence kitty behavior + +.. envvar:: KITTY_CONFIG_DIRECTORY + + Controls where kitty looks for :file:`kitty.conf` and other configuration + files. Defaults to :file:`~/.config/kitty`. For full details of the config + directory lookup mechanism see, :option:`kitty --config`. + + +Variables that kitty sets when running child programs + +.. envvar:: KITTY_WINDOW_ID + + An integer that is the id for the kitty :term:`window` the program is running in. + Can be used with the :doc:`kitty remote control facility `. + + +.. envvar:: WINDOWID + + The id for the :term:`OS Window ` the program is running in. Only available + on platforms that have ids for their windows, such as X11 and macOS. + + +.. envvar:: TERM + + The name of the terminal, defaults to ``xterm-kitty``. See :opt:`term`. + + +.. envvar:: TERMINFO + + Path to a directory containing the kitty terminfo database. + + +.. envvar:: COLORTERM + + Set to the value ``truecolor`` to indicate that kitty supports 16 million + colors. + + +.. envvar:: KITTY_LISTEN_ON + + Set when the :doc:`remote control ` facility is enabled and + the a socket is used for control via :option:`kitty --listen-on` or :opt:`listen_on`. + Contains the path to the socket. Avoids needs to use :option:`kitty @ --to` when + issuing remote control commands. + + +.. envvar:: KITTY_PIPE_DATA + + Set to data describing the layout of the screen when running child + programs using :option:`launch --stdin-source` with the contents of the + screen/scrollback piped to them. + + +.. envvar:: KITTY_CHILD_CMDLINE + + Set to the command line of the child process running in the kitty + window when calling the notification callback program on terminal bell, see + :opt:`command_on_bell`. + + +.. envvar:: KITTY_COMMON_OPTS + + Set with the values of some common kitty options when running + kittens, so kittens can use them without needing to load kitty.conf. diff --git a/docs/launch.rst b/docs/launch.rst index 6888407d6..80b8c8bf3 100644 --- a/docs/launch.rst +++ b/docs/launch.rst @@ -42,7 +42,7 @@ The piping environment -------------------------- When using :option:`launch --stdin-source`, the program to which the data is -piped has a special environment variable declared, ``KITTY_PIPE_DATA`` whose +piped has a special environment variable declared, :env:`KITTY_PIPE_DATA` whose contents are:: KITTY_PIPE_DATA={scrolled_by}:{cursor_x},{cursor_y}:{lines},{columns} diff --git a/kitty/options/definition.py b/kitty/options/definition.py index c5d271c56..5a044e2e5 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -656,6 +656,8 @@ and the window is not the currently focused window opt('command_on_bell', 'none', option_type='to_cmdline', long_text='Program to run when a bell occurs.' + ' The environment variable :env:`KITTY_CHILD_CMDLINE` can be used to get the program running in' + ' the window in which the bell occurred.' ) egr() # }}}