2021-07-21 08:05:58 +03:00
|
|
|
kitty.conf
|
2023-08-16 08:57:10 +03:00
|
|
|
================
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2018-06-05 10:07:04 +03:00
|
|
|
.. highlight:: conf
|
2018-06-03 13:37:40 +03:00
|
|
|
|
2023-08-16 08:57:10 +03:00
|
|
|
|
|
|
|
.. only:: man
|
|
|
|
|
|
|
|
Overview
|
|
|
|
--------------
|
|
|
|
|
|
|
|
|
2022-04-30 11:55:04 +03:00
|
|
|
|kitty| is highly customizable, everything from keyboard shortcuts, to rendering
|
|
|
|
frames-per-second. See below for an overview of all customization possibilities.
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2022-04-21 11:45:12 +03:00
|
|
|
You can open the config file within kitty by pressing :sc:`edit_config_file`
|
|
|
|
(:kbd:`⌘+,` on macOS). A :file:`kitty.conf` with commented default
|
|
|
|
configurations and descriptions will be created if the file does not exist.
|
|
|
|
You can reload the config file within kitty by pressing :sc:`reload_config_file`
|
|
|
|
(:kbd:`⌃+⌘+,` on macOS) or sending kitty the ``SIGUSR1`` signal.
|
2022-01-29 08:32:36 +03:00
|
|
|
You can also display the current configuration by pressing :sc:`debug_config`
|
|
|
|
(:kbd:`⌥+⌘+,` on macOS).
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2018-06-03 13:37:40 +03:00
|
|
|
.. _confloc:
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2018-06-03 13:37:40 +03:00
|
|
|
|kitty| looks for a config file in the OS config directories (usually
|
|
|
|
:file:`~/.config/kitty/kitty.conf`) but you can pass a specific path via the
|
2022-04-27 10:58:20 +03:00
|
|
|
:option:`kitty --config` option or use the :envvar:`KITTY_CONFIG_DIRECTORY`
|
|
|
|
environment variable. See :option:`kitty --config` for full details.
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2019-03-28 05:38:21 +03:00
|
|
|
Comments can be added to the config file as lines starting with the ``#``
|
2022-04-30 11:55:04 +03:00
|
|
|
character. This works only if the ``#`` character is the first character in the
|
|
|
|
line.
|
2019-03-28 05:38:21 +03:00
|
|
|
|
2023-09-23 17:50:41 +03:00
|
|
|
Lines can be split by starting the next line with the ``\`` character.
|
|
|
|
All leading whitespace and the ``\`` character are removed.
|
2023-09-03 12:19:12 +03:00
|
|
|
|
2022-03-07 18:02:02 +03:00
|
|
|
.. _include:
|
|
|
|
|
2022-11-25 07:03:34 +03:00
|
|
|
You can include secondary config files via the :code:`include` directive. If
|
2022-01-18 13:58:19 +03:00
|
|
|
you use a relative path for :code:`include`, it is resolved with respect to the
|
2018-06-03 13:37:40 +03:00
|
|
|
location of the current config file. Note that environment variables are
|
|
|
|
expanded, so :code:`${USER}.conf` becomes :file:`name.conf` if
|
2022-12-04 18:33:24 +03:00
|
|
|
:code:`USER=name`. A special environment variable :envvar:`KITTY_OS` is available,
|
|
|
|
to detect the operating system. It is ``linux``, ``macos`` or ``bsd``.
|
|
|
|
Also, you can use :code:`globinclude` to include files
|
2022-03-05 09:59:55 +03:00
|
|
|
matching a shell glob pattern and :code:`envinclude` to include configuration
|
|
|
|
from environment variables. For example::
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2018-06-03 13:37:40 +03:00
|
|
|
include other.conf
|
2022-03-05 09:59:55 +03:00
|
|
|
# Include *.conf files from all subdirs of kitty.d inside the kitty config dir
|
2022-01-18 13:58:19 +03:00
|
|
|
globinclude kitty.d/**/*.conf
|
2022-03-05 09:59:55 +03:00
|
|
|
# Include the *contents* of all env vars starting with KITTY_CONF_
|
|
|
|
envinclude KITTY_CONF_*
|
2018-05-29 18:33:50 +03:00
|
|
|
|
2018-05-31 06:10:32 +03:00
|
|
|
|
2021-06-30 13:20:43 +03:00
|
|
|
.. note:: Syntax highlighting for :file:`kitty.conf` in vim is available via
|
2022-04-30 11:55:04 +03:00
|
|
|
`vim-kitty <https://github.com/fladson/vim-kitty>`__.
|
2021-06-30 13:20:43 +03:00
|
|
|
|
|
|
|
|
2018-06-03 13:37:40 +03:00
|
|
|
.. include:: /generated/conf-kitty.rst
|
2018-06-05 11:27:51 +03:00
|
|
|
|
|
|
|
|
|
|
|
Sample kitty.conf
|
2021-07-17 13:58:42 +03:00
|
|
|
--------------------
|
2018-06-05 11:27:51 +03:00
|
|
|
|
2021-04-26 11:05:22 +03:00
|
|
|
.. only:: html
|
|
|
|
|
2022-04-30 11:55:04 +03:00
|
|
|
You can download a sample :file:`kitty.conf` file with all default settings
|
|
|
|
and comments describing each setting by clicking: :download:`sample
|
|
|
|
kitty.conf </generated/conf/kitty.conf>`.
|
2021-04-26 11:05:22 +03:00
|
|
|
|
|
|
|
.. only:: man
|
|
|
|
|
|
|
|
You can edit a fully commented sample kitty.conf by pressing the
|
2022-04-30 11:55:04 +03:00
|
|
|
:sc:`edit_config_file` shortcut in kitty. This will generate a config file
|
|
|
|
with full documentation and all settings commented out. If you have a
|
|
|
|
pre-existing :file:`kitty.conf`, then that will be used instead, delete it to
|
|
|
|
see the sample file.
|
2021-07-17 13:58:42 +03:00
|
|
|
|
2023-02-03 16:59:45 +03:00
|
|
|
A default configuration file can also be generated by running::
|
|
|
|
|
|
|
|
kitty +runpy 'from kitty.config import *; print(commented_out_default_config())'
|
|
|
|
|
|
|
|
This will print the commented out default config file to :file:`STDOUT`.
|
2021-07-17 13:58:42 +03:00
|
|
|
|
|
|
|
All mappable actions
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
See the :doc:`list of all the things you can make kitty can do </actions>`.
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
|
|
|
|
actions
|