docs: translate user documentation to French
Make the user-facing documentation readable for the French-speaking team. Anchors, roles and cross-references are unchanged so existing links keep resolving.
This commit is contained in:
12 files changed
+1064
-925
No files matched your search
+65
-56
@@ -1,125 +1,133 @@
|
||||
Install kitty
|
||||
Installer kitty
|
||||
========================
|
||||
|
||||
Binary install
|
||||
Installation des binaires
|
||||
----------------
|
||||
|
||||
.. highlight:: sh
|
||||
|
||||
You can install pre-built binaries of |kitty| if you are on macOS or Linux using
|
||||
the following simple command:
|
||||
Vous pouvez installer des binaires précompilés de |kitty| sous macOS ou Linux
|
||||
avec la commande simple suivante :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
_kitty_install_cmd
|
||||
|
||||
|
||||
The binaries will be installed in the standard location for your OS,
|
||||
:file:`/Applications/kitty.app` on macOS and :file:`~/.local/kitty.app` on
|
||||
Linux. The installer only touches files in that directory. To update kitty,
|
||||
simply re-run the command.
|
||||
Les binaires seront installés à l'emplacement standard de votre système,
|
||||
:file:`/Applications/kitty.app` sous macOS et :file:`~/.local/kitty.app` sous
|
||||
Linux. L'installateur ne touche qu'aux fichiers de ce répertoire. Pour mettre à
|
||||
jour kitty, il suffit de relancer la commande.
|
||||
|
||||
.. warning::
|
||||
**Do not** copy the kitty binary out of the installation folder. If you want
|
||||
to add it to your :envvar:`PATH`, create a symlink in :file:`~/.local/bin` or
|
||||
:file:`/usr/bin` or wherever. You should create a symlink for the :file:`kitten`
|
||||
binary as well. Whichever folder you choose to create the symlink in should
|
||||
be in the **systemwide** PATH, a folder added to the PATH in your shell rc
|
||||
files will not work when running kitty from your desktop environment.
|
||||
**Ne copiez pas** le binaire kitty en dehors du dossier d'installation. Si
|
||||
vous voulez l'ajouter à votre :envvar:`PATH`, créez un lien symbolique dans
|
||||
:file:`~/.local/bin` ou :file:`/usr/bin` ou ailleurs. Vous devriez aussi
|
||||
créer un lien symbolique pour le binaire :file:`kitten`. Le dossier dans
|
||||
lequel vous créez le lien symbolique doit se trouver dans le PATH
|
||||
**système** : un dossier ajouté au PATH depuis les fichiers rc de votre
|
||||
shell ne fonctionnera pas lorsque kitty est lancé depuis votre
|
||||
environnement de bureau.
|
||||
|
||||
|
||||
Manually installing
|
||||
Installation manuelle
|
||||
---------------------
|
||||
|
||||
If something goes wrong or you simply do not want to run the installer, you can
|
||||
manually download and install |kitty| from the `GitHub releases page
|
||||
<https://github.com/kovidgoyal/kitty/releases>`__. If you are on macOS, download
|
||||
the :file:`.dmg` and install as normal. If you are on Linux, download the
|
||||
tarball and extract it into a directory. The |kitty| executable will be in the
|
||||
:file:`bin` sub-directory.
|
||||
Si quelque chose se passe mal ou si vous ne voulez simplement pas exécuter
|
||||
l'installateur, vous pouvez télécharger et installer |kitty| manuellement
|
||||
depuis la `page des versions GitHub
|
||||
<https://github.com/kovidgoyal/kitty/releases>`__. Sous macOS, téléchargez le
|
||||
:file:`.dmg` et installez-le normalement. Sous Linux, téléchargez l'archive
|
||||
tar et extrayez-la dans un dossier. L'exécutable |kitty| se trouvera dans le
|
||||
sous-dossier :file:`bin`.
|
||||
|
||||
|
||||
Desktop integration on Linux
|
||||
Intégration au bureau sous Linux
|
||||
--------------------------------
|
||||
|
||||
If you want the kitty icon to appear in the taskbar and an entry for it to be
|
||||
present in the menus, you will need to install the :file:`kitty.desktop` file.
|
||||
The details of the following procedure may need to be adjusted for your
|
||||
particular desktop, but it should work for most major desktop environments.
|
||||
Si vous voulez que l'icône de kitty apparaisse dans la barre des tâches et
|
||||
qu'une entrée soit présente dans les menus, vous devrez installer le fichier
|
||||
:file:`kitty.desktop`. Les détails de la procédure suivante peuvent devoir être
|
||||
adaptés à votre bureau, mais elle devrait fonctionner pour la plupart des
|
||||
environnements de bureau majeurs.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Create symbolic links to add kitty and kitten to PATH (assuming ~/.local/bin is in
|
||||
# your system-wide PATH)
|
||||
# Crée des liens symboliques pour ajouter kitty et kitten au PATH (en supposant que ~/.local/bin
|
||||
# se trouve dans votre PATH système)
|
||||
ln -sf ~/.local/kitty.app/bin/kitty ~/.local/kitty.app/bin/kitten ~/.local/bin/
|
||||
# Place the kitty.desktop file somewhere it can be found by the OS
|
||||
# Place le fichier kitty.desktop là où le système peut le trouver
|
||||
cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/
|
||||
# If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file
|
||||
# Si vous voulez ouvrir des fichiers texte et des images dans kitty depuis votre gestionnaire de
|
||||
# fichiers, ajoutez aussi le fichier kitty-open.desktop
|
||||
cp ~/.local/kitty.app/share/applications/kitty-open.desktop ~/.local/share/applications/
|
||||
# Update the paths to the kitty and its icon in the kitty desktop file(s)
|
||||
# Met à jour les chemins vers kitty et son icône dans le(s) fichier(s) desktop de kitty
|
||||
sed -i "s|Icon=kitty|Icon=$(readlink -f ~)/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" ~/.local/share/applications/kitty*.desktop
|
||||
sed -i "s|Exec=kitty|Exec=$(readlink -f ~)/.local/kitty.app/bin/kitty|g" ~/.local/share/applications/kitty*.desktop
|
||||
# Make xdg-terminal-exec (and hence desktop environments that support it use kitty)
|
||||
# Fait de xdg-terminal-exec (et donc des environnements de bureau qui le prennent en charge) kitty
|
||||
echo 'kitty.desktop' > ~/.config/xdg-terminals.list
|
||||
|
||||
.. note::
|
||||
In :file:`kitty-open.desktop`, kitty is registered to handle some supported
|
||||
MIME types. This will cause kitty to take precedence on some systems where
|
||||
the default apps are not explicitly set. For example, if you expect to use
|
||||
other GUI file managers to open dir paths when using commands such as
|
||||
:program:`xdg-open`, you should configure the default opener for the MIME
|
||||
type ``inode/directory``::
|
||||
Dans :file:`kitty-open.desktop`, kitty est enregistré pour gérer certains
|
||||
types MIME pris en charge. Cela fera en sorte que kitty soit prioritaire
|
||||
sur certains systèmes où les applications par défaut ne sont pas
|
||||
explicitement définies. Par exemple, si vous comptez utiliser d'autres
|
||||
gestionnaires de fichiers graphiques pour ouvrir des chemins de dossier
|
||||
avec des commandes comme :program:`xdg-open`, vous devriez configurer
|
||||
l'ouvreur par défaut du type MIME ``inode/directory`` ::
|
||||
|
||||
xdg-mime default org.kde.dolphin.desktop inode/directory
|
||||
|
||||
.. note::
|
||||
If you use the venerable `stow <https://www.gnu.org/software/stow/>`__
|
||||
command to manage your manual installations, the following takes care of the
|
||||
above for you (use with :code:`dest=~/.local/stow`)::
|
||||
Si vous utilisez la vénérable commande `stow
|
||||
<https://www.gnu.org/software/stow/>`__ pour gérer vos installations
|
||||
manuelles, ce qui suit s'occupe de tout ce qui précède à votre place
|
||||
(à utiliser avec :code:`dest=~/.local/stow`) ::
|
||||
|
||||
cd ~/.local/stow
|
||||
stow -v kitty.app
|
||||
|
||||
|
||||
Customizing the installation
|
||||
Personnaliser l'installation
|
||||
--------------------------------
|
||||
|
||||
.. _nightly:
|
||||
|
||||
* You can install the latest nightly kitty build with ``installer``:
|
||||
* Vous pouvez installer la dernière version nightly de kitty avec
|
||||
``installer`` :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
_kitty_install_cmd \
|
||||
installer=nightly
|
||||
|
||||
Nightly builds show the date and hash of the commit they were built from in
|
||||
the output of :option:`kitty --version`.
|
||||
Les versions nightly affichent la date et le hash du commit à partir duquel
|
||||
elles ont été compilées dans la sortie de :option:`kitty --version`.
|
||||
|
||||
If you want to install it in parallel to the released kitty specify a
|
||||
different install locations with ``dest``:
|
||||
Si vous voulez l'installer en parallèle de la version publiée de kitty,
|
||||
indiquez un autre emplacement d'installation avec ``dest`` :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
_kitty_install_cmd \
|
||||
installer=nightly dest=/some/other/location
|
||||
|
||||
* You can specify a specific version to install, with:
|
||||
* Vous pouvez indiquer une version précise à installer avec :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
_kitty_install_cmd \
|
||||
installer=version-0.35.2
|
||||
|
||||
* You can tell the installer not to launch |kitty| after installing it with
|
||||
``launch=n``:
|
||||
* Vous pouvez demander à l'installateur de ne pas lancer |kitty| après
|
||||
l'installation avec ``launch=n`` :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
_kitty_install_cmd \
|
||||
launch=n
|
||||
|
||||
* You can use a previously downloaded dmg/tarball, with ``installer``:
|
||||
* Vous pouvez utiliser un dmg/tarball déjà téléchargé, avec ``installer`` :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
@@ -127,14 +135,15 @@ Customizing the installation
|
||||
installer=/path/to/dmg or tarball
|
||||
|
||||
|
||||
Uninstalling
|
||||
Désinstallation
|
||||
----------------
|
||||
|
||||
All the installer does is copy the kitty files into the install directory. To
|
||||
uninstall, simply delete that directory.
|
||||
Tout ce que fait l'installateur, c'est copier les fichiers de kitty dans le
|
||||
dossier d'installation. Pour désinstaller, il suffit de supprimer ce dossier.
|
||||
|
||||
|
||||
Building from source
|
||||
Compiler depuis les sources
|
||||
------------------------
|
||||
|
||||
|kitty| is easy to build from source, follow the :doc:`instructions <build>`.
|
||||
|kitty| est facile à compiler depuis les sources, suivez les :doc:`instructions
|
||||
<build>`.
|
||||
+120
-106
@@ -1,86 +1,94 @@
|
||||
Build from source
|
||||
==================
|
||||
Compiler depuis les sources
|
||||
===========================
|
||||
|
||||
.. image:: https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg
|
||||
:alt: Build status
|
||||
:alt: État de la compilation
|
||||
:target: https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI
|
||||
|
||||
.. note::
|
||||
If you just want to test the latest changes to kitty, you don't need to build
|
||||
from source. Instead install the :ref:`latest nightly build <nightly>`.
|
||||
Si vous voulez simplement tester les dernières modifications de kitty, vous
|
||||
n'avez pas besoin de compiler depuis les sources. Installez plutôt la
|
||||
:ref:`dernière version nightly <nightly>`.
|
||||
|
||||
.. highlight:: sh
|
||||
|
||||
|kitty| is designed to run from source, for easy hack-ability. All you need to
|
||||
get started is a C compiler and the `go compiler
|
||||
<https://go.dev/doc/install>`__ (on Linux, the :ref:`X11 development libraries <x11-dev-libs>` as well).
|
||||
After installing those, run the following commands::
|
||||
|kitty| est conçu pour s'exécuter depuis les sources, pour faciliter le
|
||||
bricolage. Tout ce dont vous avez besoin pour démarrer est un compilateur C et
|
||||
le `compilateur go <https://go.dev/doc/install>`__ (sous Linux, également les
|
||||
:ref:`bibliothèques de développement X11 <x11-dev-libs>`). Après les avoir
|
||||
installés, lancez les commandes suivantes ::
|
||||
|
||||
git clone https://github.com/kovidgoyal/kitty.git && cd kitty
|
||||
./dev.sh build
|
||||
|
||||
That's it, kitty will be built from source, magically. You can run it as
|
||||
:file:`kitty/launcher/kitty`.
|
||||
C'est tout, kitty sera compilé depuis les sources, comme par magie. Vous pouvez
|
||||
le lancer avec :file:`kitty/launcher/kitty`.
|
||||
|
||||
This works, because the :code:`./dev.sh build` command downloads all the major
|
||||
dependencies of kitty as pre-built binaries for your platform and builds kitty
|
||||
to use these rather than system libraries. The few required system libraries
|
||||
are X11 (if you use X server) and DBUS on Linux.
|
||||
Cela fonctionne parce que la commande :code:`./dev.sh build` télécharge toutes
|
||||
les dépendances majeures de kitty sous forme de binaires précompilés pour votre
|
||||
plateforme et compile kitty pour les utiliser à la place des bibliothèques
|
||||
système. Les rares bibliothèques système requises sont X11 (si vous utilisez un
|
||||
serveur X) et DBUS sous Linux.
|
||||
|
||||
If you make changes to kitty code, simply re-run :code:`./dev.sh build`
|
||||
to build kitty with your changes.
|
||||
Si vous modifiez le code de kitty, relancez simplement
|
||||
:code:`./dev.sh build` pour compiler kitty avec vos modifications.
|
||||
|
||||
.. note::
|
||||
If you plan to run kitty from source long-term, there are a couple of
|
||||
caveats to be aware of. You should occasionally run ``./dev.sh deps``
|
||||
to have the dependencies re-downloaded as they are updated periodically.
|
||||
Also, the built kitty executable assumes it will find source in whatever
|
||||
directory you first ran :code:`./dev.sh build` in. If you move/rename the
|
||||
directory, run :code:`make clean && ./dev.sh build`. You should also create
|
||||
symlinks to the :file:`kitty` and :file:`kitten` binaries from somewhere
|
||||
in your PATH so that they can be conveniently launched.
|
||||
Si vous comptez exécuter kitty depuis les sources sur le long terme,
|
||||
quelques écueils sont à connaître. Vous devriez lancer de temps en temps
|
||||
``./dev.sh deps`` pour faire retélécharger les dépendances, car elles sont
|
||||
mises à jour périodiquement. De plus, l'exécutable kitty compilé suppose
|
||||
qu'il trouvera les sources dans le dossier où vous avez lancé
|
||||
:code:`./dev.sh build` la première fois. Si vous déplacez ou renommez le
|
||||
dossier, lancez :code:`make clean && ./dev.sh build`. Vous devriez aussi
|
||||
créer des liens symboliques vers les binaires :file:`kitty` et
|
||||
:file:`kitten` depuis un dossier de votre PATH, afin de pouvoir les lancer
|
||||
facilement.
|
||||
|
||||
.. note::
|
||||
On macOS, you can use :file:`kitty/launcher/kitty.app` to run kitty as well,
|
||||
but note that this is an unsigned kitty.app so some functionality such as
|
||||
notifications will not work as Apple disallows this. If you need this
|
||||
functionality, you can try signing the built :file:`kitty.app` with a self
|
||||
signed certificate, see for example, `here
|
||||
Sous macOS, vous pouvez aussi utiliser :file:`kitty/launcher/kitty.app`
|
||||
pour lancer kitty, mais notez que ce kitty.app n'est pas signé, donc
|
||||
certaines fonctionnalités comme les notifications ne fonctionneront pas
|
||||
car Apple l'interdit. Si vous avez besoin de cette fonctionnalité, vous
|
||||
pouvez essayer de signer le :file:`kitty.app` compilé avec un certificat
|
||||
auto-signé, voir par exemple `ici
|
||||
<https://stackoverflow.com/questions/27474751/how-can-i-codesign-an-app-without-being-in-the-mac-developer-program/27474942>`__.
|
||||
|
||||
Building in debug mode
|
||||
Compiler en mode debug
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following will build with debug symbols::
|
||||
Ce qui suit compile avec les symboles de debug ::
|
||||
|
||||
./dev.sh build --debug
|
||||
|
||||
To build with sanitizers and debug symbols::
|
||||
Pour compiler avec les sanitizers et les symboles de debug ::
|
||||
|
||||
./dev.sh build --debug --sanitize
|
||||
|
||||
For more help on the various options supported by the build script::
|
||||
Pour plus d'aide sur les différentes options prises en charge par le script de
|
||||
compilation ::
|
||||
|
||||
./dev.sh build -h
|
||||
|
||||
|
||||
Building the documentation
|
||||
Compiler la documentation
|
||||
-------------------------------------
|
||||
|
||||
To have the kitty documentation available locally, run::
|
||||
Pour avoir la documentation de kitty disponible en local, lancez ::
|
||||
|
||||
./dev.sh deps -for-docs && ./dev.sh docs
|
||||
|
||||
To develop the docs, with live reloading, use::
|
||||
Pour développer la documentation, avec rechargement automatique, utilisez ::
|
||||
|
||||
./dev.sh deps -for-docs && ./dev.sh docs -live-reload
|
||||
|
||||
Dependencies
|
||||
Dépendances
|
||||
----------------
|
||||
|
||||
These dependencies are needed when building against system libraries only.
|
||||
Ces dépendances sont nécessaires uniquement lorsque vous compilez contre les
|
||||
bibliothèques système.
|
||||
|
||||
Run-time dependencies:
|
||||
Dépendances d'exécution :
|
||||
|
||||
* ``python`` >= 3.12
|
||||
* ``harfbuzz`` >= 2.2.0
|
||||
@@ -89,29 +97,29 @@ Run-time dependencies:
|
||||
* ``liblcms2``
|
||||
* ``libxxhash``
|
||||
* ``openssl``
|
||||
* ``shader-slang`` (needed only if you use custom shaders)
|
||||
* ``pixman`` (not needed on macOS)
|
||||
* ``cairo`` (not needed on macOS)
|
||||
* ``freetype`` (not needed on macOS)
|
||||
* ``fontconfig`` (not needed on macOS)
|
||||
* ``libcanberra`` (not needed on macOS)
|
||||
* ``libsystemd`` (optional, not needed on non systemd systems)
|
||||
* ``ImageMagick`` (optional, needed to display uncommon image formats in the terminal)
|
||||
* ``X11 libraries`` (optional, needed if you use X11 on Linux)
|
||||
* ``Wayland libraries`` (optional, needed if you use Wayland on Linux)
|
||||
* ``shader-slang`` (nécessaire uniquement si vous utilisez des shaders personnalisés)
|
||||
* ``pixman`` (non nécessaire sous macOS)
|
||||
* ``cairo`` (non nécessaire sous macOS)
|
||||
* ``freetype`` (non nécessaire sous macOS)
|
||||
* ``fontconfig`` (non nécessaire sous macOS)
|
||||
* ``libcanberra`` (non nécessaire sous macOS)
|
||||
* ``libsystemd`` (facultatif, non nécessaire sur les systèmes sans systemd)
|
||||
* ``ImageMagick`` (facultatif, nécessaire pour afficher les formats d'image peu courants dans le terminal)
|
||||
* ``X11 libraries`` (facultatif, nécessaire si vous utilisez X11 sous Linux)
|
||||
* ``Wayland libraries`` (facultatif, nécessaire si vous utilisez Wayland sous Linux)
|
||||
|
||||
|
||||
Build-time dependencies:
|
||||
Dépendances de compilation :
|
||||
|
||||
* ``gcc`` or ``clang``
|
||||
* ``gcc`` ou ``clang``
|
||||
* ``simde``
|
||||
* ``shader-slang``
|
||||
* ``go`` >= _build_go_version (see :file:`go.mod` for go packages used during building)
|
||||
* ``go`` >= _build_go_version (voir :file:`go.mod` pour les paquets go utilisés lors de la compilation)
|
||||
* ``pkg-config``
|
||||
* Symbols NERD Font Mono either installed system-wide or placed in :file:`fonts/SymbolsNerdFontMono-Regular.ttf`
|
||||
* For building on Linux in addition to the above dependencies you might also
|
||||
need to install the following packages, if they are not already installed by
|
||||
your distro:
|
||||
* Symbols NERD Font Mono, installée à l'échelle du système ou placée dans :file:`fonts/SymbolsNerdFontMono-Regular.ttf`
|
||||
* Pour compiler sous Linux, en plus des dépendances ci-dessus, vous devrez
|
||||
peut-être installer les paquets suivants s'ils ne sont pas déjà installés
|
||||
par votre distribution :
|
||||
|
||||
- ``liblcms2-dev``
|
||||
- ``libfontconfig-dev``
|
||||
@@ -123,7 +131,7 @@ Build-time dependencies:
|
||||
|
||||
.. _x11-dev-libs:
|
||||
|
||||
Also, the X11 development libraries:
|
||||
Ainsi que les bibliothèques de développement X11 :
|
||||
|
||||
- ``libdbus-1-dev``
|
||||
- ``libxcursor-dev``
|
||||
@@ -137,84 +145,90 @@ Build-time dependencies:
|
||||
|
||||
|
||||
|
||||
Build and run from source with Nix
|
||||
Compiler et exécuter depuis les sources avec Nix
|
||||
-------------------------------------------
|
||||
|
||||
On NixOS or any other Linux or macOS system with the Nix package manager
|
||||
installed, execute `nix-shell
|
||||
<https://nixos.org/guides/nix-pills/developing-with-nix-shell.html>`__ to create
|
||||
the correct environment to build kitty or use ``nix-shell --pure`` instead to
|
||||
eliminate most of the influence of the outside system, e.g. globally installed
|
||||
packages. ``nix-shell`` will automatically fetch all required dependencies and
|
||||
make them available in the newly spawned shell.
|
||||
Sous NixOS ou tout autre système Linux ou macOS disposant du gestionnaire de
|
||||
paquets Nix, exécutez `nix-shell
|
||||
<https://nixos.org/guides/nix-pills/developing-with-nix-shell.html>`__ pour
|
||||
créer l'environnement correct afin de compiler kitty, ou utilisez plutôt
|
||||
``nix-shell --pure`` pour éliminer la plupart de l'influence du système
|
||||
extérieur, par exemple les paquets installés globalement. ``nix-shell``
|
||||
récupérera automatiquement toutes les dépendances requises et les rendra
|
||||
disponibles dans le shell nouvellement lancé.
|
||||
|
||||
Then proceed with ``make`` or ``make app`` according to the platform specific
|
||||
instructions above.
|
||||
Puis poursuivez avec ``make`` ou ``make app`` selon les instructions propres à
|
||||
votre plateforme ci-dessus.
|
||||
|
||||
.. _packagers:
|
||||
|
||||
Notes for Linux/macOS packagers
|
||||
Notes pour les empaqueteurs Linux/macOS
|
||||
----------------------------------
|
||||
|
||||
The released |kitty| source code is available as a `tarball`_ from
|
||||
`the GitHub releases page <https://github.com/kovidgoyal/kitty/releases>`__.
|
||||
Le code source publié de |kitty| est disponible sous forme de `tarball`_ depuis
|
||||
`la page des versions GitHub
|
||||
<https://github.com/kovidgoyal/kitty/releases>`__.
|
||||
|
||||
While |kitty| does use Python, it is not a traditional Python package, so please
|
||||
do not install it in site-packages.
|
||||
Instead run::
|
||||
Bien que |kitty| utilise Python, ce n'est pas un paquet Python traditionnel,
|
||||
donc ne l'installez pas dans site-packages. Lancez plutôt ::
|
||||
|
||||
make linux-package
|
||||
|
||||
This will install |kitty| into the directory :file:`linux-package`. You can run
|
||||
|kitty| with :file:`linux-package/bin/kitty`. All the files needed to run kitty
|
||||
will be in :file:`linux-package/lib/kitty`. The terminfo file will be installed
|
||||
into :file:`linux-package/share/terminfo`. Simply copy these files into
|
||||
:file:`/usr` to install |kitty|. In other words, :file:`linux-package` is the
|
||||
staging area into which |kitty| is installed. You can choose a different staging
|
||||
area, by passing the ``--prefix`` argument to :file:`setup.py`.
|
||||
Cela installera |kitty| dans le dossier :file:`linux-package`. Vous pouvez
|
||||
lancer |kitty| avec :file:`linux-package/bin/kitty`. Tous les fichiers
|
||||
nécessaires à l'exécution de kitty se trouveront dans
|
||||
:file:`linux-package/lib/kitty`. Le fichier terminfo sera installé dans
|
||||
:file:`linux-package/share/terminfo`. Il suffit de copier ces fichiers dans
|
||||
:file:`/usr` pour installer |kitty|. Autrement dit, :file:`linux-package` est
|
||||
la zone de préparation dans laquelle |kitty| est installé. Vous pouvez choisir
|
||||
une autre zone de préparation en passant l'argument ``--prefix`` à
|
||||
:file:`setup.py`.
|
||||
|
||||
You should probably split |kitty| into three packages:
|
||||
Vous devriez probablement découper |kitty| en trois paquets :
|
||||
|
||||
:code:`kitty-terminfo`
|
||||
Installs the terminfo file
|
||||
Installe le fichier terminfo
|
||||
|
||||
:code:`kitty-shell-integration`
|
||||
Installs the shell integration scripts (the contents of the
|
||||
shell-integration directory in the kitty source code), probably to
|
||||
Installe les scripts d'intégration du shell (le contenu du dossier
|
||||
shell-integration du code source de kitty), probablement dans
|
||||
:file:`/usr/share/kitty/shell-integration`
|
||||
|
||||
:code:`kitty`
|
||||
Installs the main program
|
||||
Installe le programme principal
|
||||
|
||||
This allows users to install the terminfo and shell integration files on
|
||||
servers into which they ssh, without needing to install all of |kitty|. The
|
||||
shell integration files **must** still be present in
|
||||
:file:`lib/kitty/shell-integration` when installing the kitty main package as
|
||||
the kitty program expects to find them there.
|
||||
Cela permet aux utilisateurs d'installer les fichiers terminfo et
|
||||
d'intégration du shell sur les serveurs auxquels ils se connectent en SSH, sans
|
||||
avoir à installer tout |kitty|. Les fichiers d'intégration du shell **doivent**
|
||||
tout de même être présents dans :file:`lib/kitty/shell-integration` lors de
|
||||
l'installation du paquet principal kitty, car le programme kitty s'attend à les
|
||||
y trouver.
|
||||
|
||||
.. note::
|
||||
You need a couple of extra dependencies to build linux-package. :file:`tic`
|
||||
to compile terminfo files, usually found in the development package of
|
||||
:file:`ncurses`. Also, if you are building from a git checkout instead of the
|
||||
released source code tarball, you will need to install the dependencies from
|
||||
:file:`docs/requirements.txt` to build the kitty documentation. They can be
|
||||
installed most easily with ``python -m pip install -r docs/requirements.txt``.
|
||||
Vous avez besoin de quelques dépendances supplémentaires pour construire
|
||||
linux-package. :file:`tic` pour compiler les fichiers terminfo, généralement
|
||||
fourni dans le paquet de développement de :file:`ncurses`. De plus, si vous
|
||||
compilez depuis un dépôt git plutôt que depuis l'archive des sources
|
||||
publiées, vous devrez installer les dépendances de
|
||||
:file:`docs/requirements.txt` pour compiler la documentation de kitty. Elles
|
||||
s'installent le plus facilement avec ``python -m pip install -r docs/requirements.txt``.
|
||||
|
||||
This applies to creating packages for |kitty| for macOS package managers such as
|
||||
Homebrew or MacPorts as well.
|
||||
Cela vaut aussi pour la création de paquets de |kitty| pour les gestionnaires
|
||||
de paquets macOS tels que Homebrew ou MacPorts.
|
||||
|
||||
Cross compilation
|
||||
Compilation croisée
|
||||
-------------------
|
||||
|
||||
While cross compilation is neither officially supported, nor recommended, as it
|
||||
means the test suite cannot be run for the cross compiled build, there is some
|
||||
support for cross compilation. Basically, run::
|
||||
La compilation croisée n'est ni officiellement prise en charge ni recommandée,
|
||||
car cela signifie que la suite de tests ne peut pas être exécutée sur la
|
||||
compilation croisée, mais elle est partiellement prise en charge. En résumé,
|
||||
lancez ::
|
||||
|
||||
make prepare-for-cross-compile
|
||||
|
||||
Then setup the cross compile environment (CC, CFLAGS, PATH, etc.) and run::
|
||||
Configurez ensuite l'environnement de compilation croisée (CC, CFLAGS, PATH,
|
||||
etc.) et lancez ::
|
||||
|
||||
make cross-compile
|
||||
|
||||
This will create the cross compiled build in the :file:`linux-package`
|
||||
directory.
|
||||
Cela créera la compilation croisée dans le dossier :file:`linux-package`.
|
||||
+59
-51
@@ -6,93 +6,101 @@ kitty.conf
|
||||
|
||||
.. only:: man
|
||||
|
||||
Overview
|
||||
Vue d'ensemble
|
||||
--------------
|
||||
|
||||
|
||||
|kitty| is highly customizable, everything from keyboard shortcuts, to rendering
|
||||
frames-per-second. See below for an overview of all customization possibilities.
|
||||
|kitty| est hautement personnalisable, des raccourcis clavier jusqu'au nombre
|
||||
d'images par seconde. Voir ci-dessous une vue d'ensemble de toutes les
|
||||
possibilités de personnalisation.
|
||||
|
||||
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.
|
||||
The configuration is automatically reloaded when modified, controlled by
|
||||
:opt:`auto_reload_config`. You can manually reload the config by pressing
|
||||
:sc:`reload_config_file` (:kbd:`⌃+⌘+,` on macOS) or sending |kitty| the
|
||||
``SIGUSR1`` signal with ``kill -SIGUSR1 $KITTY_PID``. You can also display the
|
||||
current configuration by pressing :sc:`debug_config` (:kbd:`⌥+⌘+,` on macOS).
|
||||
Vous pouvez ouvrir le fichier de configuration dans |kitty| en appuyant sur
|
||||
:sc:`edit_config_file` (:kbd:`⌘+,` sous macOS). Un :file:`kitty.conf` contenant
|
||||
les configurations par défaut commentées et leurs descriptions sera créé si le
|
||||
fichier n'existe pas. La configuration est rechargée automatiquement lorsqu'elle
|
||||
est modifiée, ce qui est contrôlé par :opt:`auto_reload_config`. Vous pouvez
|
||||
recharger manuellement la configuration en appuyant sur
|
||||
:sc:`reload_config_file` (:kbd:`⌃+⌘+,` sous macOS) ou en envoyant le signal
|
||||
``SIGUSR1`` à |kitty| avec ``kill -SIGUSR1 $KITTY_PID``. Vous pouvez aussi
|
||||
afficher la configuration courante en appuyant sur :sc:`debug_config`
|
||||
(:kbd:`⌥+⌘+,` sous macOS).
|
||||
|
||||
.. _confloc:
|
||||
|
||||
|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
|
||||
:option:`kitty --config` option or use the :envvar:`KITTY_CONFIG_DIRECTORY`
|
||||
environment variable. See :option:`kitty --config` for full details.
|
||||
|kitty| cherche un fichier de configuration dans les dossiers de configuration
|
||||
du système (généralement :file:`~/.config/kitty/kitty.conf`), mais vous pouvez
|
||||
indiquer un chemin particulier avec l'option :option:`kitty --config` ou la
|
||||
variable d'environnement :envvar:`KITTY_CONFIG_DIRECTORY`. Voir
|
||||
:option:`kitty --config` pour tous les détails.
|
||||
|
||||
**Comments** can be added to the config file as lines whose first non-whitespace
|
||||
character is ``#``. Trailing comments after configuration values are not
|
||||
generally supported.
|
||||
**Les commentaires** peuvent être ajoutés au fichier de configuration sous forme
|
||||
de lignes dont le premier caractère non blanc est ``#``. Les commentaires en fin
|
||||
de ligne, après une valeur de configuration, ne sont généralement pas pris en
|
||||
charge.
|
||||
|
||||
**Lines can be split** by starting the next line with the ``\`` character.
|
||||
All leading whitespace and the ``\`` character are removed.
|
||||
**Les lignes peuvent être scindées** en commençant la ligne suivante par le
|
||||
caractère ``\``. Tous les espaces de début et le caractère ``\`` sont supprimés.
|
||||
|
||||
.. _include:
|
||||
|
||||
You can **include secondary config files** via the :code:`include` directive. If
|
||||
you use a relative path for :code:`include`, it is resolved with respect to the
|
||||
location of the current config file. Note that environment variables are
|
||||
expanded, so :code:`${USER}.conf` becomes :file:`name.conf` if
|
||||
: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
|
||||
matching a shell glob pattern and :code:`envinclude` to include configuration
|
||||
from environment variables. Finally, you can dynamically generate configuration
|
||||
by running a program using :code:`geninclude`. For example::
|
||||
Vous pouvez **inclure des fichiers de configuration secondaires** via la
|
||||
directive :code:`include`. Si vous utilisez un chemin relatif pour
|
||||
:code:`include`, il est résolu par rapport à l'emplacement du fichier de
|
||||
configuration courant. Notez que les variables d'environnement sont expandues,
|
||||
donc :code:`${USER}.conf` devient :file:`name.conf` si :code:`USER=name`. Une
|
||||
variable d'environnement spéciale :envvar:`KITTY_OS` est disponible pour
|
||||
détecter le système d'exploitation. Elle vaut ``linux``, ``macos`` ou ``bsd``.
|
||||
Vous pouvez également utiliser :code:`globinclude` pour inclure les fichiers
|
||||
correspondant à un motif glob du shell et :code:`envinclude` pour inclure la
|
||||
configuration depuis des variables d'environnement. Enfin, vous pouvez générer
|
||||
dynamiquement la configuration en exécutant un programme avec
|
||||
:code:`geninclude`. Par exemple ::
|
||||
|
||||
# Include other.conf
|
||||
# Inclut other.conf
|
||||
include other.conf
|
||||
# Include *.conf files from all subdirs of kitty.d inside the kitty config dir
|
||||
# Inclut les fichiers *.conf de tous les sous-dossiers de kitty.d dans le dossier de config de kitty
|
||||
globinclude kitty.d/**/*.conf
|
||||
# Include the *contents* of all env vars starting with KITTY_CONF_
|
||||
# Inclut le *contenu* de toutes les variables d'env commençant par KITTY_CONF_
|
||||
envinclude KITTY_CONF_*
|
||||
# Run the script dynamic.py placed in the same directory as this config file
|
||||
# and include its :file:`STDOUT`. Note that Python scripts are fastest
|
||||
# as they use the embedded Python interpreter, but any executable script
|
||||
# or program is supported, in any language. Remember to mark the script
|
||||
# file executable.
|
||||
# Lance le script dynamic.py placé dans le même dossier que ce fichier de configuration
|
||||
# et inclut sa :file:`STDOUT`. Notez que les scripts Python sont les plus rapides
|
||||
# car ils utilisent l'interpréteur Python embarqué, mais tout script exécutable
|
||||
# ou programme est accepté, dans n'importe quel langage. Pensez à rendre le fichier
|
||||
# de script exécutable.
|
||||
geninclude dynamic.py
|
||||
|
||||
|
||||
.. include:: /generated/conf-kitty.rst
|
||||
|
||||
|
||||
Sample kitty.conf
|
||||
Exemple de kitty.conf
|
||||
--------------------
|
||||
|
||||
.. only:: html
|
||||
|
||||
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>`.
|
||||
Vous pouvez télécharger un exemple de fichier :file:`kitty.conf` contenant
|
||||
tous les réglages par défaut et des commentaires décrivant chaque réglage en
|
||||
cliquant ici : :download:`exemple de kitty.conf </generated/conf/kitty.conf>`.
|
||||
|
||||
.. only:: man
|
||||
|
||||
You can edit a fully commented sample kitty.conf by pressing the
|
||||
: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.
|
||||
Vous pouvez éditer un exemple entièrement commenté de kitty.conf en appuyant
|
||||
sur le raccourci :sc:`edit_config_file` dans kitty. Cela générera un fichier
|
||||
de configuration avec la documentation complète et tous les réglages
|
||||
commentés. Si un :file:`kitty.conf` existe déjà, c'est lui qui sera utilisé ;
|
||||
supprimez-le pour voir le fichier d'exemple.
|
||||
|
||||
A default configuration file can also be generated by running::
|
||||
Un fichier de configuration par défaut peut aussi être généré en lançant ::
|
||||
|
||||
kitty +runpy 'from kitty.config import *; print(commented_out_default_config())'
|
||||
|
||||
This will print the commented out default config file to :file:`STDOUT`.
|
||||
Cela affichera le fichier de configuration par défaut commenté sur
|
||||
:file:`STDOUT`.
|
||||
|
||||
All mappable actions
|
||||
Toutes les actions associables
|
||||
------------------------
|
||||
|
||||
See the :doc:`list of all the things you can make |kitty| can do </actions>`.
|
||||
Voir la :doc:`liste de tout ce que vous pouvez faire faire à |kitty| </actions>`.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
+164
-138
@@ -1,277 +1,303 @@
|
||||
:orphan:
|
||||
|
||||
Glossary
|
||||
Glossaire
|
||||
=========
|
||||
|
||||
.. glossary::
|
||||
|
||||
os_window
|
||||
kitty has two kinds of windows. Operating System windows, referred to as :term:`OS
|
||||
Window <os_window>`, and *kitty windows*. An OS Window consists of one or more kitty
|
||||
:term:`tabs <tab>`. Each tab in turn consists of one or more *kitty
|
||||
windows* organized in a :term:`layout`.
|
||||
kitty possède deux types de fenêtres. Les fenêtres du système
|
||||
d'exploitation, appelées :term:`fenêtres OS <os_window>`, et les *fenêtres
|
||||
kitty*. Une fenêtre OS contient un ou plusieurs :term:`onglets <tab>`
|
||||
kitty. Chaque onglet contient à son tour une ou plusieurs *fenêtres kitty*
|
||||
organisées selon une :term:`disposition <layout>`.
|
||||
|
||||
tab
|
||||
A *tab* refers to a group of :term:`kitty windows <window>`, organized in
|
||||
a :term:`layout`. Every :term:`OS Window <os_window>` contains one or more tabs.
|
||||
Un *onglet* désigne un groupe de :term:`fenêtres kitty <window>`, organisé
|
||||
selon une :term:`disposition <layout>`. Chaque :term:`fenêtre OS
|
||||
<os_window>` contient un ou plusieurs onglets.
|
||||
|
||||
layout
|
||||
A *layout* is a system of organizing :term:`kitty windows <window>` in
|
||||
groups inside a tab. The layout automatically maintains the size and
|
||||
position of the windows, think of a layout as a tiling window manager for
|
||||
the terminal. See :doc:`layouts` for details.
|
||||
Une *disposition* est un système d'organisation des :term:`fenêtres kitty
|
||||
<window>` en groupes à l'intérieur d'un onglet. La disposition maintient
|
||||
automatiquement la taille et la position des fenêtres ; voyez-la comme un
|
||||
gestionnaire de fenêtres en mosaïque pour le terminal. Voir
|
||||
:doc:`layouts` pour les détails.
|
||||
|
||||
window
|
||||
kitty has two kinds of windows. Operating System windows, referred to as :term:`OS
|
||||
Window <os_window>`, and *kitty windows*. An OS Window consists of one or more kitty
|
||||
:term:`tabs <tab>`. Each tab in turn consists of one or more *kitty
|
||||
windows* organized in a :term:`layout`.
|
||||
kitty possède deux types de fenêtres. Les fenêtres du système
|
||||
d'exploitation, appelées :term:`fenêtres OS <os_window>`, et les *fenêtres
|
||||
kitty*. Une fenêtre OS contient un ou plusieurs :term:`onglets <tab>`
|
||||
kitty. Chaque onglet contient à son tour une ou plusieurs *fenêtres kitty*
|
||||
organisées selon une :term:`disposition <layout>`.
|
||||
|
||||
overlay
|
||||
An *overlay window* is a :term:`kitty window <window>` that is placed on
|
||||
top of an existing kitty window, entirely covering it. Overlays are used
|
||||
throughout kitty, for example, to display the :ref:`the scrollback buffer <scrollback>`,
|
||||
to display :doc:`hints </kittens/hints>`, for :doc:`unicode input
|
||||
</kittens/unicode_input>` etc. Normal overlays are meant for short
|
||||
duration popups and so are not considered the :italic:`active window`
|
||||
when determining the current working directory or getting input text for
|
||||
kittens, launch commands, etc. To create an overlay considered as a
|
||||
:italic:`main window` use the :code:`overlay-main` argument to
|
||||
:doc:`launch`.
|
||||
Une *fenêtre en surcouche* est une :term:`fenêtre kitty <window>` placée
|
||||
au-dessus d'une fenêtre kitty existante et la recouvrant entièrement. Les
|
||||
surcouches sont utilisées partout dans kitty, par exemple pour afficher
|
||||
:ref:`le tampon d'historique <scrollback>`, pour afficher :doc:`les
|
||||
indices </kittens/hints>`, pour :doc:`la saisie Unicode
|
||||
</kittens/unicode_input>`, etc. Les surcouches normales sont destinées à
|
||||
des fenêtres contextuelles de courte durée et ne sont donc pas
|
||||
considérées comme la :italic:`fenêtre active` lors de la détermination du
|
||||
répertoire de travail courant ou de la récupération du texte saisi pour
|
||||
les kittens, les commandes launch, etc. Pour créer une surcouche
|
||||
considérée comme une :italic:`fenêtre principale`, utilisez l'argument
|
||||
:code:`overlay-main` de :doc:`launch`.
|
||||
|
||||
hyperlinks
|
||||
Terminals can have hyperlinks, just like the internet. In kitty you can
|
||||
:doc:`control exactly what happens <open_actions>` when clicking on a
|
||||
hyperlink, based on the type of link and its URL. See also `Hyperlinks in terminal
|
||||
emulators <https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>`__.
|
||||
Les terminaux peuvent contenir des liens hypertextes, comme l'internet.
|
||||
Dans kitty, vous pouvez :doc:`contrôler exactement ce qui se passe
|
||||
<open_actions>` lors d'un clic sur un lien, selon le type de lien et son
|
||||
URL. Voir aussi `Hyperlinks in terminal emulators
|
||||
<https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda>`__.
|
||||
|
||||
kittens
|
||||
Small, independent statically compiled command line programs that are designed to run
|
||||
inside kitty windows and provide it with lots of powerful and flexible
|
||||
features such as viewing images, connecting conveniently to remote
|
||||
computers, transferring files, inputting unicode characters, etc.
|
||||
They can also be written by users in Python and used to customize and
|
||||
extend kitty functionality, see :doc:`kittens_intro` for details.
|
||||
The vast majority of kittens that ship with kitty are written in Go,
|
||||
with a small Python shim to handle the in-process part of the
|
||||
interaction.
|
||||
Petits programmes en ligne de commande, indépendants et compilés
|
||||
statiquement, conçus pour s'exécuter dans les fenêtres kitty et lui
|
||||
apporter de nombreuses fonctionnalités puissantes et souples, comme
|
||||
l'affichage d'images, la connexion pratique à des ordinateurs distants,
|
||||
le transfert de fichiers, la saisie de caractères Unicode, etc.
|
||||
Ils peuvent aussi être écrits par les utilisateurs en Python et servir à
|
||||
personnaliser et étendre les fonctionnalités de kitty, voir
|
||||
:doc:`kittens_intro` pour les détails. La grande majorité des kittens
|
||||
fournis avec kitty sont écrits en Go, avec une petite surcouche Python
|
||||
pour gérer la partie de l'interaction qui se fait dans le processus.
|
||||
|
||||
easing function
|
||||
A function that controls how an animation progresses over time. kitty
|
||||
support the `CSS syntax for easing functions
|
||||
<https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function>`__.
|
||||
Commonly used easing functions are :code:`linear` for a constant rate
|
||||
animation and :code:`ease-in-out` for an animation that starts slow,
|
||||
becomes fast in the middle and ends slowly. These are used to control
|
||||
various animations in kitty, such as :opt:`cursor_blink_interval` and
|
||||
Une fonction qui contrôle la progression d'une animation dans le temps.
|
||||
kitty prend en charge la `syntaxe CSS des fonctions d'interpolation
|
||||
<https://developer.mozilla.org/fr/docs/Web/CSS/easing-function>`__. Les
|
||||
fonctions les plus courantes sont :code:`linear` pour une animation à
|
||||
vitesse constante et :code:`ease-in-out` pour une animation qui démarre
|
||||
lentement, s'accélère au milieu et se termine lentement. Elles contrôlent
|
||||
diverses animations de kitty, comme :opt:`cursor_blink_interval` et
|
||||
:opt:`visual_bell_duration`.
|
||||
|
||||
SIMD
|
||||
A programming technique that refers to having a single CPU instruction
|
||||
process multiple units of data, also called vector programming. Leads to
|
||||
large speedups for various data processing tasks.
|
||||
Une technique de programmation consistant à faire traiter plusieurs
|
||||
unités de données par une seule instruction du processeur, aussi appelée
|
||||
programmation vectorielle. Elle apporte d'importants gains de vitesse
|
||||
pour diverses tâches de traitement de données.
|
||||
|
||||
.. _env_vars:
|
||||
|
||||
Environment variables
|
||||
Variables d'environnement
|
||||
------------------------
|
||||
|
||||
Variables that influence kitty behavior
|
||||
Variables qui influencent le comportement de kitty
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. 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`.
|
||||
Contrôle l'endroit où kitty cherche :file:`kitty.conf` et les autres
|
||||
fichiers de configuration. Par défaut :file:`~/.config/kitty`. Pour tous les
|
||||
détails du mécanisme de recherche du dossier de configuration, voir
|
||||
:option:`kitty --config`.
|
||||
|
||||
.. envvar:: KITTY_CACHE_DIRECTORY
|
||||
|
||||
Controls where kitty stores cache files. Defaults to :file:`~/.cache/kitty`
|
||||
or :file:`~/Library/Caches/kitty` on macOS.
|
||||
Contrôle l'endroit où kitty stocke ses fichiers de cache. Par défaut
|
||||
:file:`~/.cache/kitty` ou :file:`~/Library/Caches/kitty` sous macOS.
|
||||
|
||||
.. envvar:: KITTY_RUNTIME_DIRECTORY
|
||||
|
||||
Controls where kitty stores runtime files like sockets. On macOS, the
|
||||
default is the native per-user cache directory returned by
|
||||
:code:`getconf DARWIN_USER_CACHE_DIR`. On other platforms, kitty uses
|
||||
:code:`XDG_RUNTIME_DIR` if defined, otherwise :file:`/run/user/<uid>` if
|
||||
accessible, falling back to the :file:`run` directory inside the kitty
|
||||
cache directory.
|
||||
Contrôle l'endroit où kitty stocke les fichiers d'exécution comme les
|
||||
sockets. Sous macOS, la valeur par défaut est le dossier de cache natif par
|
||||
utilisateur renvoyé par :code:`getconf DARWIN_USER_CACHE_DIR`. Sur les
|
||||
autres plateformes, kitty utilise :code:`XDG_RUNTIME_DIR` s'il est défini,
|
||||
sinon :file:`/run/user/<uid>` s'il est accessible, et se rabat sur le
|
||||
dossier :file:`run` à l'intérieur du dossier de cache de kitty.
|
||||
|
||||
.. envvar:: VISUAL
|
||||
|
||||
The terminal based text editor (such as :program:`vi` or :program:`nano`)
|
||||
kitty uses, when, for instance, opening :file:`kitty.conf` in response to
|
||||
:sc:`edit_config_file`.
|
||||
L'éditeur de texte en mode terminal (comme :program:`vi` ou
|
||||
:program:`nano`) utilisé par kitty, par exemple pour ouvrir
|
||||
:file:`kitty.conf` en réponse à :sc:`edit_config_file`.
|
||||
|
||||
.. envvar:: EDITOR
|
||||
|
||||
Same as :envvar:`VISUAL`. Used if :envvar:`VISUAL` is not set.
|
||||
Identique à :envvar:`VISUAL`. Utilisée si :envvar:`VISUAL` n'est pas
|
||||
définie.
|
||||
|
||||
.. envvar:: SHELL
|
||||
|
||||
Specifies the default shell kitty will run when :opt:`shell` is set to
|
||||
Indique le shell par défaut que kitty lancera lorsque :opt:`shell` vaut
|
||||
:code:`.`.
|
||||
|
||||
.. envvar:: GLFW_IM_MODULE
|
||||
|
||||
Set this to ``ibus`` to enable support for IME under X11.
|
||||
Mettez-la à ``ibus`` pour activer la prise en charge de l'IME sous X11.
|
||||
|
||||
.. envvar:: KITTY_WAYLAND_DETECT_MODIFIERS
|
||||
|
||||
When set to a non-empty value, kitty attempts to autodiscover XKB modifiers
|
||||
under Wayland. This is useful if using non-standard modifiers like hyper. It
|
||||
is possible for the autodiscovery to fail; the default Wayland XKB mappings
|
||||
are used in this case. See :pull:`3943` for details.
|
||||
Lorsqu'elle est définie à une valeur non vide, kitty tente de découvrir
|
||||
automatiquement les modificateurs XKB sous Wayland. C'est utile si vous
|
||||
utilisez des modificateurs non standard comme hyper. La découverte
|
||||
automatique peut échouer ; les associations XKB Wayland par défaut sont
|
||||
alors utilisées. Voir :pull:`3943` pour les détails.
|
||||
|
||||
.. envvar:: SSH_ASKPASS
|
||||
|
||||
Specify the program for SSH to ask for passwords. When this is set, :doc:`ssh
|
||||
kitten </kittens/ssh>` will use this environment variable by default. See
|
||||
:opt:`askpass <kitten-ssh.askpass>` for details.
|
||||
Indique le programme que SSH utilise pour demander les mots de passe.
|
||||
Lorsqu'elle est définie, :doc:`le kitten ssh </kittens/ssh>` utilisera cette
|
||||
variable d'environnement par défaut. Voir :opt:`askpass <kitten-ssh.askpass>`
|
||||
pour les détails.
|
||||
|
||||
.. envvar:: KITTY_CLONE_SOURCE_CODE
|
||||
|
||||
Set this to some shell code that will be executed in the cloned window with
|
||||
:code:`eval` when :ref:`clone-in-kitty <clone_shell>` is used.
|
||||
Définissez-la avec du code shell qui sera exécuté avec :code:`eval` dans la
|
||||
fenêtre clonée lorsque :ref:`clone-in-kitty <clone_shell>` est utilisé.
|
||||
|
||||
.. envvar:: KITTY_CLONE_SOURCE_PATH
|
||||
|
||||
Set this to the path of a file that will be sourced in the cloned window when
|
||||
:ref:`clone-in-kitty <clone_shell>` is used.
|
||||
Définissez-la avec le chemin d'un fichier qui sera sourcé dans la fenêtre
|
||||
clonée lorsque :ref:`clone-in-kitty <clone_shell>` est utilisé.
|
||||
|
||||
.. envvar:: KITTY_DEVELOP_FROM
|
||||
|
||||
Set this to the directory path of the kitty source code and its Python code
|
||||
will be loaded from there. Only works with official binary builds.
|
||||
Définissez-la avec le chemin du dossier des sources de kitty pour que son
|
||||
code Python soit chargé depuis là. Ne fonctionne qu'avec les compilations
|
||||
binaires officielles.
|
||||
|
||||
.. envvar:: KITTY_RC_PASSWORD
|
||||
|
||||
Set this to a pass phrase to use the ``kitten @`` remote control command with
|
||||
:opt:`remote_control_password`.
|
||||
Définissez-la avec une phrase de passe pour utiliser la commande de contrôle
|
||||
à distance ``kitten @`` avec :opt:`remote_control_password`.
|
||||
|
||||
|
||||
Variables that kitty sets when running child programs
|
||||
Variables que kitty définit en lançant des programmes enfants
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. envvar:: LANG
|
||||
|
||||
This is only set on macOS. If the country and language from the macOS user
|
||||
settings form an invalid locale, it will be set to :code:`en_US.UTF-8`.
|
||||
Définie uniquement sous macOS. Si le pays et la langue des réglages
|
||||
utilisateur de macOS forment une locale invalide, elle est définie à
|
||||
:code:`en_US.UTF-8`.
|
||||
|
||||
.. envvar:: PATH
|
||||
|
||||
kitty prepends itself to the PATH of its own environment to ensure the
|
||||
functions calling :program:`kitty` will work properly.
|
||||
kitty s'ajoute en tête du PATH de son propre environnement afin que les
|
||||
fonctions appelant :program:`kitty` fonctionnent correctement.
|
||||
|
||||
.. 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 <remote-control>`.
|
||||
Un entier qui est l'identifiant de la :term:`fenêtre <window>` kitty dans
|
||||
laquelle le programme s'exécute. Utilisable avec la :doc:`facilité de
|
||||
contrôle à distance de kitty <remote-control>`.
|
||||
|
||||
.. envvar:: KITTY_PID
|
||||
|
||||
An integer that is the process id for the kitty process in which the program
|
||||
is running. Allows programs to tell kitty to reload its config by sending it
|
||||
the SIGUSR1 signal.
|
||||
Un entier qui est l'identifiant du processus kitty dans lequel le programme
|
||||
s'exécute. Permet aux programmes de demander à kitty de recharger sa
|
||||
configuration en lui envoyant le signal SIGUSR1.
|
||||
|
||||
.. envvar:: KITTY_PUBLIC_KEY
|
||||
|
||||
A public key that programs can use to communicate securely with kitty using
|
||||
the remote control protocol. The format is: :code:`protocol:key data`.
|
||||
Une clé publique que les programmes peuvent utiliser pour communiquer de
|
||||
façon sécurisée avec kitty via le protocole de contrôle à distance. Le
|
||||
format est : :code:`protocol:key data`.
|
||||
|
||||
.. envvar:: WINDOWID
|
||||
|
||||
The id for the :term:`OS Window <os_window>` the program is running in. Only available
|
||||
on platforms that have ids for their windows, such as X11 and macOS.
|
||||
L'identifiant de la :term:`fenêtre OS <os_window>` dans laquelle le
|
||||
programme s'exécute. Disponible uniquement sur les plateformes ayant des
|
||||
identifiants de fenêtre, comme X11 et macOS.
|
||||
|
||||
.. envvar:: TERM
|
||||
|
||||
The name of the terminal, defaults to ``xterm-kitty``. See :opt:`term`.
|
||||
Le nom du terminal, par défaut ``xterm-kitty``. Voir :opt:`term`.
|
||||
|
||||
.. envvar:: TERMINFO
|
||||
|
||||
Path to a directory containing the kitty terminfo database. Or the terminfo
|
||||
database itself encoded in base64. See :opt:`terminfo_type`.
|
||||
Chemin d'un dossier contenant la base terminfo de kitty. Ou la base terminfo
|
||||
elle-même encodée en base64. Voir :opt:`terminfo_type`.
|
||||
|
||||
.. envvar:: KITTY_INSTALLATION_DIR
|
||||
|
||||
Path to the kitty installation directory.
|
||||
Chemin du dossier d'installation de kitty.
|
||||
|
||||
.. envvar:: COLORTERM
|
||||
|
||||
Set to the value ``truecolor`` to indicate that kitty supports 16 million
|
||||
colors.
|
||||
Définie à la valeur ``truecolor`` pour indiquer que kitty prend en charge 16
|
||||
millions de couleurs.
|
||||
|
||||
.. envvar:: KITTY_LISTEN_ON
|
||||
|
||||
Set when the :doc:`remote control <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. Avoid the need to use :option:`kitten @ --to` when
|
||||
issuing remote control commands. Can also be a file descriptor of the form
|
||||
fd:num instead of a socket address, in which case, remote control
|
||||
communication should proceed over the specified file descriptor.
|
||||
Définie lorsque la :doc:`facilité de contrôle à distance <remote-control>`
|
||||
est activée et qu'un socket est utilisé pour le contrôle via
|
||||
:option:`kitty --listen-on` ou :opt:`listen_on`. Contient le chemin du
|
||||
socket. Évite d'avoir à utiliser :option:`kitten @ --to` en émettant des
|
||||
commandes de contrôle à distance. Peut aussi être un descripteur de fichier
|
||||
de la forme fd:num au lieu d'une adresse de socket, auquel cas la
|
||||
communication de contrôle à distance doit passer par le descripteur de
|
||||
fichier indiqué.
|
||||
|
||||
.. 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.
|
||||
Définie avec les données décrivant l'agencement de l'écran lors de
|
||||
l'exécution de programmes enfants avec :option:`launch --stdin-source`, le
|
||||
contenu de l'écran et de l'historique leur étant envoyé.
|
||||
|
||||
.. 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`.
|
||||
Définie avec la ligne de commande du processus enfant qui s'exécute dans la
|
||||
fenêtre kitty lors de l'appel du programme de notification sur sonnerie du
|
||||
terminal, voir :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 :file:`kitty.conf`.
|
||||
Définie avec les valeurs de quelques options courantes de kitty lors de
|
||||
l'exécution de kittens, afin qu'ils puissent les utiliser sans avoir à
|
||||
charger :file:`kitty.conf`.
|
||||
|
||||
.. envvar:: KITTY_SHELL_INTEGRATION
|
||||
|
||||
Set when enabling :ref:`shell_integration`. It is automatically removed by
|
||||
the shell integration scripts.
|
||||
Définie lors de l'activation de :ref:`shell_integration`. Elle est
|
||||
automatiquement supprimée par les scripts d'intégration du shell.
|
||||
|
||||
.. envvar:: KITTY_SI_RUN_COMMAND_AT_STARTUP
|
||||
|
||||
Set this to an expression that the kitty shell integration scripts will
|
||||
``eval`` after the shell is started. Note that this environment variable
|
||||
is ignored when present in the environment in which kitty itself is launched
|
||||
in. It is most useful with the ``--env`` flag for the :doc:`launch <launch>`
|
||||
action.
|
||||
Définissez-la avec une expression que les scripts d'intégration du shell de
|
||||
kitty évalueront avec ``eval`` après le démarrage du shell. Notez que cette
|
||||
variable est ignorée lorsqu'elle est présente dans l'environnement dans
|
||||
lequel kitty lui-même est lancé. Elle est surtout utile avec l'option
|
||||
``--env`` de l'action :doc:`launch <launch>`.
|
||||
|
||||
.. envvar:: ZDOTDIR
|
||||
|
||||
Set when enabling :ref:`shell_integration` with :program:`zsh`, allowing
|
||||
:program:`zsh` to automatically load the integration script.
|
||||
Définie lors de l'activation de :ref:`shell_integration` avec
|
||||
:program:`zsh`, ce qui permet à :program:`zsh` de charger automatiquement le
|
||||
script d'intégration.
|
||||
|
||||
.. envvar:: XDG_DATA_DIRS
|
||||
|
||||
Set when enabling :ref:`shell_integration` with :program:`fish`, allowing
|
||||
:program:`fish` to automatically load the integration script.
|
||||
Définie lors de l'activation de :ref:`shell_integration` avec
|
||||
:program:`fish`, ce qui permet à :program:`fish` de charger automatiquement
|
||||
le script d'intégration.
|
||||
|
||||
.. envvar:: ENV
|
||||
|
||||
Set when enabling :ref:`shell_integration` with :program:`bash`, allowing
|
||||
:program:`bash` to automatically load the integration script.
|
||||
Définie lors de l'activation de :ref:`shell_integration` avec
|
||||
:program:`bash`, ce qui permet à :program:`bash` de charger automatiquement
|
||||
le script d'intégration.
|
||||
|
||||
.. envvar:: KITTY_OS
|
||||
|
||||
Set when using the include directive in kitty.conf. Can take values:
|
||||
``linux``, ``macos``, ``bsd``.
|
||||
Définie lors de l'utilisation de la directive include dans kitty.conf. Peut
|
||||
prendre les valeurs : ``linux``, ``macos``, ``bsd``.
|
||||
|
||||
.. envvar:: KITTY_HOLD
|
||||
|
||||
Set to ``1`` when kitty is running a shell because of the ``--hold`` flag. Can
|
||||
be used to specialize shell behavior in the shell rc files as desired.
|
||||
Définie à ``1`` lorsque kitty exécute un shell à cause de l'option
|
||||
``--hold``. Peut servir à spécialiser le comportement du shell dans les
|
||||
fichiers rc du shell selon vos besoins.
|
||||
|
||||
.. envvar:: KITTY_SIMD
|
||||
|
||||
Set it to ``128`` to use 128 bit vector registers, ``256`` to use 256 bit
|
||||
vector registers, or ``512`` to use AVX-512 on x86-64. Any other value
|
||||
prevents kitty from using SIMD CPU vector instructions. Warning, this
|
||||
overrides CPU capability detection so will cause kitty to crash with SIGILL
|
||||
if your CPU does not support the necessary SIMD extensions.
|
||||
Mettez-la à ``128`` pour utiliser des registres vectoriels de 128 bits,
|
||||
``256`` pour des registres de 256 bits, ou ``512`` pour utiliser AVX-512 sur
|
||||
x86-64. Toute autre valeur empêche kitty d'utiliser les instructions
|
||||
vectorielles SIMD du processeur. Attention, cela outrepasse la détection des
|
||||
capacités du processeur et fera planter kitty avec SIGILL si votre
|
||||
processeur ne prend pas en charge les extensions SIMD nécessaires.
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
:orphan:
|
||||
|
||||
The kitty command line interface
|
||||
L'interface en ligne de commande de kitty
|
||||
====================================
|
||||
|
||||
.. program:: kitty
|
||||
@@ -9,7 +9,7 @@ The kitty command line interface
|
||||
|
||||
.. include:: basic.rst
|
||||
|
||||
See also
|
||||
Voir aussi
|
||||
-----------
|
||||
|
||||
See kitty.conf(5)
|
||||
Voir kitty.conf(5)
|
||||
+55
-49
@@ -1,6 +1,6 @@
|
||||
.. _kittens:
|
||||
|
||||
Extend with kittens
|
||||
Étendre avec les kittens
|
||||
-----------------------
|
||||
|
||||
.. toctree::
|
||||
@@ -25,89 +25,95 @@ Extend with kittens
|
||||
kittens/custom
|
||||
kittens/*
|
||||
|
||||
|kitty| has a framework for easily creating terminal programs that make use of
|
||||
its advanced features. These programs are called kittens. They are used both to
|
||||
add features to |kitty| itself and to create useful standalone programs.
|
||||
Some prominent kittens:
|
||||
|kitty| dispose d'un framework pour créer facilement des programmes de terminal
|
||||
tirant parti de ses fonctionnalités avancées. Ces programmes sont appelés des
|
||||
kittens. Ils servent à la fois à ajouter des fonctionnalités à |kitty| lui-même
|
||||
et à créer des programmes autonomes utiles. Quelques kittens importants :
|
||||
|
||||
:doc:`icat <kittens/icat>`
|
||||
Display images in the terminal.
|
||||
Affiche des images dans le terminal.
|
||||
|
||||
|
||||
:doc:`diff <kittens/diff>`
|
||||
A fast, side-by-side diff for the terminal with syntax highlighting and
|
||||
Un diff côte à côte rapide pour le terminal, avec coloration syntaxique et
|
||||
images.
|
||||
|
||||
|
||||
:doc:`Unicode input <kittens/unicode_input>`
|
||||
Easily input arbitrary Unicode characters in |kitty| by name or hex code.
|
||||
:doc:`Saisie Unicode <kittens/unicode_input>`
|
||||
Saisit facilement des caractères Unicode arbitraires dans |kitty| par nom ou
|
||||
par code hexadécimal.
|
||||
|
||||
|
||||
:doc:`Themes <kittens/themes>`
|
||||
Preview and quick switch between over three hundred color themes.
|
||||
:doc:`Thèmes <kittens/themes>`
|
||||
Prévisualisez et passez rapidement d'un thème à l'autre parmi plus de trois
|
||||
cents thèmes de couleurs.
|
||||
|
||||
|
||||
:doc:`Fonts <kittens/choose-fonts>`
|
||||
Preview, fine-tune and quick switch the fonts used by kitty.
|
||||
:doc:`Polices <kittens/choose-fonts>`
|
||||
Prévisualisez, ajustez finement et changez rapidement les polices utilisées
|
||||
par kitty.
|
||||
|
||||
|
||||
:doc:`Hints <kittens/hints>`
|
||||
Select and open/paste/insert arbitrary text snippets such as URLs,
|
||||
filenames, words, lines, etc. from the terminal screen.
|
||||
:doc:`Indices <kittens/hints>`
|
||||
Sélectionnez et ouvrez, collez ou insérez des extraits de texte arbitraires
|
||||
tels que des URL, des noms de fichiers, des mots, des lignes, etc. depuis
|
||||
l'écran du terminal.
|
||||
|
||||
|
||||
:doc:`Command palette <kittens/command-palette>`
|
||||
Browse, search and trigger all keyboard shortcuts and actions from a
|
||||
single searchable overlay.
|
||||
:doc:`Palette de commandes <kittens/command-palette>`
|
||||
Parcourez, cherchez et déclenchez tous les raccourcis clavier et actions
|
||||
depuis une seule surcouche de recherche.
|
||||
|
||||
|
||||
:doc:`Quick access terminal <kittens/quick-access-terminal>`
|
||||
Get access to a quick access floating, semi-transparent kitty window
|
||||
with a single keypress.
|
||||
:doc:`Terminal à accès rapide <kittens/quick-access-terminal>`
|
||||
Accédez à une fenêtre kitty flottante et semi-transparente d'accès rapide
|
||||
avec une seule combinaison de touches.
|
||||
|
||||
|
||||
:doc:`Panel <kittens/panel>`
|
||||
Draw the desktop wallpaper or docks and panels using arbitrary
|
||||
terminal programs.
|
||||
:doc:`Panneau <kittens/panel>`
|
||||
Dessinez le fond d'écran du bureau ou des docks et panneaux à l'aide de
|
||||
programmes de terminal arbitraires.
|
||||
|
||||
|
||||
:doc:`Choose files <kittens/choose-files>`
|
||||
Preview and select files at the speed of thought
|
||||
:doc:`Choisir des fichiers <kittens/choose-files>`
|
||||
Prévisualisez et sélectionnez des fichiers à la vitesse de la pensée
|
||||
|
||||
|
||||
:doc:`Drag and drop from the shell <kittens/dnd>`
|
||||
Drag and drop files from/to GUI programs from your shell, even over SSH
|
||||
:doc:`Glisser-déposer depuis le shell <kittens/dnd>`
|
||||
Glissez-déposez des fichiers depuis et vers des programmes graphiques depuis
|
||||
votre shell, même via SSH
|
||||
|
||||
|
||||
:doc:`Remote file <kittens/remote_file>`
|
||||
Edit, open, or download remote files over SSH easily, by simply clicking on
|
||||
the filename.
|
||||
:doc:`Fichiers distants <kittens/remote_file>`
|
||||
Éditez, ouvrez ou téléchargez facilement des fichiers distants via SSH, en
|
||||
cliquant simplement sur le nom du fichier.
|
||||
|
||||
|
||||
:doc:`Transfer files <kittens/transfer>`
|
||||
Transfer files and directories seamlessly and easily from remote machines
|
||||
over your existing SSH sessions with a simple command.
|
||||
:doc:`Transférer des fichiers <kittens/transfer>`
|
||||
Transférez sans effort des fichiers et des dossiers depuis des machines
|
||||
distantes via vos sessions SSH existantes, avec une simple commande.
|
||||
|
||||
|
||||
:doc:`Hyperlinked grep <kittens/hyperlinked_grep>`
|
||||
Search your files using `ripgrep <https://github.com/BurntSushi/ripgrep>`__
|
||||
and open the results directly in your favorite editor in the terminal,
|
||||
at the line containing the search result, simply by clicking on the result
|
||||
you want.
|
||||
:doc:`grep avec liens <kittens/hyperlinked_grep>`
|
||||
Cherchez dans vos fichiers avec `ripgrep
|
||||
<https://github.com/BurntSushi/ripgrep>`__ et ouvrez les résultats
|
||||
directement dans votre éditeur préféré en mode terminal, à la ligne
|
||||
contenant le résultat, en cliquant simplement sur le résultat voulu.
|
||||
|
||||
|
||||
:doc:`Broadcast <kittens/broadcast>`
|
||||
Type in one :term:`kitty window <window>` and have it broadcast to all (or a
|
||||
subset) of other :term:`kitty windows <window>`.
|
||||
:doc:`Diffusion <kittens/broadcast>`
|
||||
Tapez dans une :term:`fenêtre kitty <window>` et faites-le diffuser vers
|
||||
toutes les autres :term:`fenêtres kitty <window>` (ou une partie d'entre
|
||||
elles).
|
||||
|
||||
|
||||
:doc:`SSH <kittens/ssh>`
|
||||
SSH with automatic :ref:`shell integration <shell_integration>`, connection
|
||||
re-use for low latency and easy cloning of local shell and editor
|
||||
configuration to the remote host.
|
||||
SSH avec :ref:`intégration du shell <shell_integration>` automatique,
|
||||
réutilisation de la connexion pour une faible latence et clonage facile de
|
||||
la configuration locale du shell et de l'éditeur vers l'hôte distant.
|
||||
|
||||
|
||||
:doc:`Clipboard <kittens/clipboard>`
|
||||
Copy/paste to the clipboard from shell scripts, even over SSH.
|
||||
:doc:`Presse-papiers <kittens/clipboard>`
|
||||
Copiez/collez dans le presse-papiers depuis des scripts shell, même via SSH.
|
||||
|
||||
You can also :doc:`Learn to create your own kittens <kittens/custom>`.
|
||||
Vous pouvez aussi :doc:`apprendre à créer vos propres kittens <kittens/custom>`.
|
||||
+124
-110
@@ -1,128 +1,139 @@
|
||||
The :command:`launch` command
|
||||
La commande :command:`launch`
|
||||
--------------------------------
|
||||
|
||||
.. program:: launch
|
||||
|
||||
|
||||
|kitty| has a :code:`launch` action that can be used to run arbitrary programs
|
||||
in new windows/tabs. It can be mapped to user defined shortcuts in
|
||||
:file:`kitty.conf`. It is very powerful and allows sending the contents of the
|
||||
current window to the launched program, as well as many other options.
|
||||
|kitty| dispose d'une action :code:`launch` qui permet de lancer des programmes
|
||||
arbitraires dans de nouvelles fenêtres ou de nouveaux onglets. Elle peut être
|
||||
associée à des raccourcis définis par l'utilisateur dans :file:`kitty.conf`.
|
||||
Elle est très puissante et permet d'envoyer le contenu de la fenêtre courante au
|
||||
programme lancé, ainsi que bien d'autres options.
|
||||
|
||||
In the simplest form, you can use it to open a new kitty window running the
|
||||
shell, as shown below::
|
||||
Dans sa forme la plus simple, vous pouvez l'utiliser pour ouvrir une nouvelle
|
||||
fenêtre kitty exécutant le shell, comme montré ci-dessous ::
|
||||
|
||||
map f1 launch
|
||||
|
||||
To run a different program simply pass the command line as arguments to launch::
|
||||
Pour lancer un autre programme, passez simplement la ligne de commande en
|
||||
arguments à launch ::
|
||||
|
||||
map f1 launch vim path/to/some/file
|
||||
|
||||
To open a new window with the same working directory as the currently active
|
||||
window::
|
||||
Pour ouvrir une nouvelle fenêtre dans le même répertoire de travail que la
|
||||
fenêtre actuellement active ::
|
||||
|
||||
map f1 launch --cwd=current
|
||||
|
||||
To open the new window in a new tab::
|
||||
Pour ouvrir la nouvelle fenêtre dans un nouvel onglet ::
|
||||
|
||||
map f1 launch --type=tab
|
||||
|
||||
To open a window docked to the bottom of the active window, using ten lines,
|
||||
see :ref:`docks`::
|
||||
Pour ouvrir une fenêtre ancrée en bas de la fenêtre active, sur dix lignes, voir
|
||||
:ref:`docks` ::
|
||||
|
||||
map f1 launch --type=window-dock --dock-edge=bottom --dock-size=10
|
||||
|
||||
To run multiple commands in a shell, use::
|
||||
Pour lancer plusieurs commandes dans un shell, utilisez ::
|
||||
|
||||
map f1 launch sh -c "ls && exec zsh"
|
||||
|
||||
To pass the contents of the current screen and scrollback to the started
|
||||
process::
|
||||
Pour passer le contenu de l'écran courant et de l'historique au processus
|
||||
démarré ::
|
||||
|
||||
map f1 launch --stdin-source=@screen_scrollback less
|
||||
|
||||
There are many more powerful options, refer to the complete list below.
|
||||
Il existe beaucoup d'autres options puissantes, référez-vous à la liste complète
|
||||
ci-dessous.
|
||||
|
||||
.. note::
|
||||
To avoid duplicating launch actions with frequently used parameters, you can
|
||||
use :opt:`action_alias` to define launch action aliases. For example::
|
||||
Pour éviter de dupliquer les actions launch avec des paramètres fréquemment
|
||||
utilisés, vous pouvez utiliser :opt:`action_alias` pour définir des alias
|
||||
d'action launch. Par exemple ::
|
||||
|
||||
action_alias launch_tab launch --cwd=current --type=tab
|
||||
map f1 launch_tab vim
|
||||
map f2 launch_tab emacs
|
||||
|
||||
The :kbd:`F1` key will now open :program:`vim` in a new tab with the current
|
||||
windows working directory.
|
||||
La touche :kbd:`F1` ouvrira désormais :program:`vim` dans un nouvel onglet
|
||||
avec le répertoire de travail de la fenêtre courante.
|
||||
|
||||
|
||||
The piping environment
|
||||
L'environnement du pipe
|
||||
--------------------------
|
||||
|
||||
When using :option:`launch --stdin-source`, the program to which the data is
|
||||
piped has a special environment variable declared, :envvar:`KITTY_PIPE_DATA`
|
||||
whose contents are::
|
||||
Lorsque vous utilisez :option:`launch --stdin-source`, le programme auquel les
|
||||
données sont envoyées dispose d'une variable d'environnement spéciale,
|
||||
:envvar:`KITTY_PIPE_DATA`, dont le contenu est ::
|
||||
|
||||
KITTY_PIPE_DATA={scrolled_by}:{cursor_x},{cursor_y}:{lines},{columns}
|
||||
|
||||
where ``scrolled_by`` is the number of lines kitty is currently scrolled by,
|
||||
``cursor_(x|y)`` is the position of the cursor on the screen with ``(1,1)``
|
||||
being the top left corner and ``{lines},{columns}`` being the number of rows
|
||||
and columns of the screen.
|
||||
où ``scrolled_by`` est le nombre de lignes de défilement actuel de kitty,
|
||||
``cursor_(x|y)`` est la position du curseur à l'écran avec ``(1,1)``
|
||||
correspondant au coin supérieur gauche et ``{lines},{columns}`` étant le nombre
|
||||
de lignes et de colonnes de l'écran.
|
||||
|
||||
|
||||
Special arguments
|
||||
Arguments spéciaux
|
||||
-------------------
|
||||
|
||||
There are a few special placeholder arguments that can be specified as part of
|
||||
the command line:
|
||||
Quelques arguments de remplacement spéciaux peuvent être indiqués dans la ligne
|
||||
de commande :
|
||||
|
||||
|
||||
``@selection``
|
||||
Replaced by the currently selected text.
|
||||
Remplacé par le texte actuellement sélectionné.
|
||||
|
||||
``@active-kitty-window-id``
|
||||
Replaced by the id of the currently active kitty window.
|
||||
Remplacé par l'identifiant de la fenêtre kitty actuellement active.
|
||||
|
||||
``@line-count``
|
||||
Replaced by the number of lines in STDIN. Only present when passing some
|
||||
data to STDIN.
|
||||
Remplacé par le nombre de lignes sur STDIN. Présent uniquement lorsque des
|
||||
données sont passées sur STDIN.
|
||||
|
||||
``@input-line-number``
|
||||
Replaced by the number of lines a pager should scroll to match the current
|
||||
scroll position in kitty. See :opt:`scrollback_pager` for details.
|
||||
Remplacé par le nombre de lignes que le pager doit faire défiler pour
|
||||
correspondre à la position de défilement courante dans kitty. Voir
|
||||
:opt:`scrollback_pager` pour les détails.
|
||||
|
||||
``@scrolled-by``
|
||||
Replaced by the number of lines kitty is currently scrolled by.
|
||||
Remplacé par le nombre de lignes de défilement actuel de kitty.
|
||||
|
||||
``@cursor-x``
|
||||
Replaced by the current cursor x position with 1 being the leftmost cell.
|
||||
Remplacé par la position x courante du curseur, 1 étant la cellule la plus
|
||||
à gauche.
|
||||
|
||||
``@cursor-y``
|
||||
Replaced by the current cursor y position with 1 being the topmost cell.
|
||||
Remplacé par la position y courante du curseur, 1 étant la cellule la plus
|
||||
haute.
|
||||
|
||||
``@first-line-on-screen``
|
||||
Replaced by the first line on screen. Can be used for pager positioning.
|
||||
Remplacé par la première ligne à l'écran. Utilisable pour le positionnement
|
||||
du pager.
|
||||
|
||||
``@last-line-on-screen``
|
||||
Replaced by the last line on screen. Can be used for pager positioning.
|
||||
Remplacé par la dernière ligne à l'écran. Utilisable pour le positionnement
|
||||
du pager.
|
||||
|
||||
|
||||
For example::
|
||||
Par exemple ::
|
||||
|
||||
map f1 launch my-program @active-kitty-window-id
|
||||
|
||||
|
||||
.. _watchers:
|
||||
|
||||
Watching launched windows
|
||||
Surveiller les fenêtres lancées
|
||||
---------------------------
|
||||
|
||||
The :option:`launch --watcher` option allows you to specify Python functions
|
||||
that will be called at specific events, such as when the window is resized or
|
||||
closed. Note that you can also specify watchers that are loaded for all windows,
|
||||
via :opt:`watcher`. To create a watcher, specify the path to a Python module
|
||||
that specifies callback functions for the events you are interested in, for
|
||||
create :file:`~/.config/kitty/mywatcher.py` and use :option:`launch --watcher` = :file:`mywatcher.py`:
|
||||
L'option :option:`launch --watcher` vous permet d'indiquer des fonctions Python
|
||||
qui seront appelées lors d'événements précis, comme le redimensionnement ou la
|
||||
fermeture de la fenêtre. Notez que vous pouvez aussi indiquer des watchers
|
||||
chargés pour toutes les fenêtres, via :opt:`watcher`. Pour créer un watcher,
|
||||
indiquez le chemin d'un module Python qui définit des fonctions de rappel pour
|
||||
les événements qui vous intéressent ; par exemple créez
|
||||
:file:`~/.config/kitty/mywatcher.py` et utilisez :option:`launch --watcher` =
|
||||
:file:`mywatcher.py` :
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -134,110 +145,113 @@ create :file:`~/.config/kitty/mywatcher.py` and use :option:`launch --watcher` =
|
||||
|
||||
|
||||
def on_load(boss: Boss, data: dict[str, Any]) -> None:
|
||||
# This is a special function that is called just once when this watcher
|
||||
# module is first loaded, can be used to perform any initialization/one
|
||||
# time setup. Any exceptions in this function are printed to kitty's
|
||||
# STDERR but otherwise ignored.
|
||||
# Fonction spéciale appelée une seule fois lors du premier chargement de
|
||||
# ce module watcher ; utile pour toute initialisation ou configuration
|
||||
# ponctuelle. Les exceptions levées ici sont affichées sur STDERR de
|
||||
# kitty mais ignorées par ailleurs.
|
||||
...
|
||||
|
||||
def on_resize(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# Here data will contain old_geometry and new_geometry
|
||||
# Note that resize is also called the first time a window is created
|
||||
# which can be detected as old_geometry will have all zero values, in
|
||||
# particular, old_geometry.xnum and old_geometry.ynum will be zero.
|
||||
# Ici data contient old_geometry et new_geometry.
|
||||
# Notez que resize est aussi appelé lors de la première création d'une
|
||||
# fenêtre, ce qui se détecte au fait que old_geometry aura toutes ses
|
||||
# valeurs à zéro, en particulier old_geometry.xnum et old_geometry.ynum
|
||||
# valant zéro.
|
||||
...
|
||||
|
||||
def on_focus_change(boss: Boss, window: Window, data: dict[str, Any])-> None:
|
||||
# Here data will contain focused
|
||||
# Ici data contient focused
|
||||
...
|
||||
|
||||
def on_close(boss: Boss, window: Window, data: dict[str, Any])-> None:
|
||||
# called when window is closed, typically when the program running in
|
||||
# it exits
|
||||
# appelé lorsque la fenêtre est fermée, typiquement quand le programme
|
||||
# qui y tourne se termine
|
||||
...
|
||||
|
||||
def on_set_user_var(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when a "user variable" is set or deleted on a window. Here
|
||||
# data will contain key and value
|
||||
# appelé lorsqu'une « variable utilisateur » est définie ou supprimée sur
|
||||
# une fenêtre. Ici data contient key et value
|
||||
...
|
||||
|
||||
def on_title_change(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when the window title is changed on a window. Here
|
||||
# data will contain title and from_child. from_child will be True
|
||||
# when a title change was requested via escape code from the program
|
||||
# running in the terminal
|
||||
# appelé lorsque le titre d'une fenêtre change. Ici data contient title
|
||||
# et from_child. from_child vaut True lorsque le changement de titre a été
|
||||
# demandé par un code d'échappement du programme qui tourne dans le
|
||||
# terminal
|
||||
...
|
||||
|
||||
def on_cmd_startstop(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when the shell starts/stops executing a command. Here
|
||||
# data will contain is_start, cmdline and time.
|
||||
# appelé lorsque le shell commence ou termine l'exécution d'une commande.
|
||||
# Ici data contient is_start, cmdline et time.
|
||||
...
|
||||
|
||||
def on_program_status_change(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when the program status (OSC 7501) records of the window
|
||||
# change. Here data will contain program_status, the list of current
|
||||
# records, each a dict with keys: id, state, kind, progress, app,
|
||||
# title and msg.
|
||||
# appelé lorsque les enregistrements d'état de programme (OSC 7501) de la
|
||||
# fenêtre changent. Ici data contient program_status, la liste des
|
||||
# enregistrements courants, chacun étant un dict avec les clés : id,
|
||||
# state, kind, progress, app, title et msg.
|
||||
...
|
||||
|
||||
def on_color_scheme_preference_change(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when the color scheme preference of this window changes from
|
||||
# light to dark or vice versa. data contains is_dark and via_escape_code
|
||||
# the latter will be true if the color scheme was changed via escape
|
||||
# code received from the program running in the window
|
||||
# appelé lorsque la préférence de jeu de couleurs de cette fenêtre passe
|
||||
# de clair à sombre ou inversement. data contient is_dark et
|
||||
# via_escape_code, ce dernier valant True si le jeu de couleurs a été
|
||||
# changé par un code d'échappement reçu du programme de la fenêtre
|
||||
...
|
||||
|
||||
def on_tab_bar_dirty(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when any changes happen to the tab bar, such a new tabs being
|
||||
# created, tab titles changing, tabs moving, etc. Useful to display the
|
||||
# tab bar externally to kitty. This is called even if the tab bar is
|
||||
# hidden. Note that this is called only in *global watchers*, that is
|
||||
# watchers defined in kitty.conf or using the --watcher command line
|
||||
# flag. data contains tab_manager which is the object responsible for
|
||||
# managing all tabs in a single OS Window.
|
||||
# appelé lorsque la barre d'onglets change : création d'onglets, changement
|
||||
# de titre, déplacement d'onglets, etc. Utile pour afficher la barre
|
||||
# d'onglets en dehors de kitty. Appelé même si la barre d'onglets est
|
||||
# masquée. Notez que cela n'est appelé que dans les *watchers globaux*,
|
||||
# c'est-à-dire les watchers définis dans kitty.conf ou avec l'option
|
||||
# --watcher. data contient tab_manager, l'objet responsable de la gestion
|
||||
# de tous les onglets d'une même fenêtre OS.
|
||||
...
|
||||
|
||||
def on_quit(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# called when kitty is about to quit. This is called in *global watchers*
|
||||
# only. It is called twice: once before the quit confirmation dialog is
|
||||
# shown (data['confirmed'] will be False) and once after the user has
|
||||
# confirmed quitting (data['confirmed'] will be True). Setting
|
||||
# data['aborted'] to True will abort the quit in both cases.
|
||||
# appelé lorsque kitty est sur le point de quitter. Appelé uniquement dans
|
||||
# les *watchers globaux*. Appelé deux fois : une fois avant l'affichage de
|
||||
# la boîte de confirmation (data['confirmed'] vaut False) et une fois
|
||||
# après confirmation par l'utilisateur (data['confirmed'] vaut True).
|
||||
# Mettre data['aborted'] à True annule la fermeture dans les deux cas.
|
||||
...
|
||||
|
||||
|
||||
Every callback is passed a reference to the global ``Boss`` object as well as
|
||||
the ``Window`` object the action is occurring on. The ``data`` object is a dict
|
||||
that contains event dependent data. You have full access to kitty internals in
|
||||
the watcher scripts, however kitty internals are not documented/stable so for
|
||||
most things you are better off using the kitty :doc:`Remote control API </remote-control>`.
|
||||
Simply call :code:`boss.call_remote_control()`, with the same arguments you
|
||||
would pass to ``kitten @``. For example:
|
||||
Chaque fonction de rappel reçoit une référence à l'objet global ``Boss`` ainsi
|
||||
qu'à l'objet ``Window`` concerné par l'action. L'objet ``data`` est un dict qui
|
||||
contient les données propres à l'événement. Vous avez un accès complet aux
|
||||
entrailles de kitty dans les scripts watcher, mais elles ne sont ni
|
||||
documentées ni stables ; pour la plupart des besoins, mieux vaut utiliser
|
||||
l':doc:`API de contrôle à distance </remote-control>` de kitty. Appelez
|
||||
simplement :code:`boss.call_remote_control()`, avec les mêmes arguments que
|
||||
vous passeriez à ``kitten @``. Par exemple :
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def on_resize(boss: Boss, window: Window, data: dict[str, Any]) -> None:
|
||||
# send some text to the resized window
|
||||
# envoie du texte à la fenêtre redimensionnée
|
||||
boss.call_remote_control(window, ('send-text', f'--match=id:{window.id}', 'hello world'))
|
||||
|
||||
Run, ``kitten @ --help`` in a kitty terminal, to see all the remote control
|
||||
commands available to you.
|
||||
Lancez ``kitten @ --help`` dans un terminal kitty pour voir toutes les commandes
|
||||
de contrôle à distance à votre disposition.
|
||||
|
||||
|
||||
Finding executables
|
||||
Recherche des exécutables
|
||||
-----------------------
|
||||
|
||||
When you specify a command to run as just a name rather than an absolute path,
|
||||
it is searched for in the system-wide :envvar:`PATH` environment variable. Note
|
||||
that this **may not** be the value of :envvar:`PATH` inside a shell, as shell
|
||||
startup scripts often change the value of this variable. If it is not found
|
||||
there, then a system specific list of default paths is searched. If it is still
|
||||
not found, then your shell is run and the value of :envvar:`PATH` inside the
|
||||
shell is used.
|
||||
Lorsque vous indiquez une commande à exécuter sous forme de simple nom plutôt
|
||||
que de chemin absolu, elle est recherchée dans la variable d'environnement
|
||||
:envvar:`PATH` du système. Notez que ce **n'est peut-être pas** la valeur de
|
||||
:envvar:`PATH` dans un shell, car les scripts de démarrage du shell modifient
|
||||
souvent cette variable. Si la commande n'y est pas trouvée, une liste de
|
||||
chemins par défaut propre au système est parcourue. Si elle n'est toujours pas
|
||||
trouvée, votre shell est lancé et la valeur de :envvar:`PATH` à l'intérieur du
|
||||
shell est utilisée.
|
||||
|
||||
See :opt:`exe_search_path` for details and how to control this.
|
||||
Voir :opt:`exe_search_path` pour les détails et la façon de contrôler cela.
|
||||
|
||||
Syntax reference
|
||||
Référence de syntaxe
|
||||
------------------
|
||||
|
||||
.. include:: /generated/launch.rst
|
||||
+60
-55
@@ -1,36 +1,38 @@
|
||||
Mark text on screen
|
||||
Marquer du texte à l'écran
|
||||
---------------------
|
||||
|
||||
|
||||
kitty has the ability to mark text on the screen based on regular expressions.
|
||||
This can be useful to highlight words or phrases when browsing output from long
|
||||
running programs or similar. Lets start with a few examples:
|
||||
kitty peut marquer du texte à l'écran à partir d'expressions régulières. C'est
|
||||
utile pour mettre en évidence des mots ou des phrases lors de la lecture de la
|
||||
sortie de programmes longs. Commençons par quelques exemples :
|
||||
|
||||
Examples
|
||||
Exemples
|
||||
----------
|
||||
|
||||
Suppose we want to be able to highlight the word :code:`ERROR` in the current
|
||||
window. Add the following to :file:`kitty.conf`::
|
||||
Supposons que nous voulions pouvoir mettre en évidence le mot :code:`ERROR`
|
||||
dans la fenêtre courante. Ajoutez ce qui suit à :file:`kitty.conf` ::
|
||||
|
||||
map f1 toggle_marker text 1 ERROR
|
||||
|
||||
Now when you press :kbd:`F1`, all instances of the word :code:`ERROR` will be
|
||||
highlighted. To turn off the highlighting, press :kbd:`F1` again.
|
||||
If you want to make it case-insensitive, use::
|
||||
Désormais, quand vous appuyez sur :kbd:`F1`, toutes les occurrences du mot
|
||||
:code:`ERROR` sont mises en évidence. Pour désactiver la mise en évidence,
|
||||
appuyez à nouveau sur :kbd:`F1`. Si vous voulez la rendre insensible à la
|
||||
casse, utilisez ::
|
||||
|
||||
map f1 toggle_marker itext 1 ERROR
|
||||
|
||||
To make it match only complete words, use::
|
||||
Pour qu'elle ne corresponde qu'à des mots complets, utilisez ::
|
||||
|
||||
map f1 toggle_marker regex 1 \\bERROR\\b
|
||||
|
||||
Suppose you want to highlight both :code:`ERROR` and :code:`WARNING`, case
|
||||
insensitively::
|
||||
Supposons que vous vouliez mettre en évidence à la fois :code:`ERROR` et
|
||||
:code:`WARNING`, sans tenir compte de la casse ::
|
||||
|
||||
map f1 toggle_marker iregex 1 \\bERROR\\b 2 \\bWARNING\\b
|
||||
|
||||
kitty supports up to 3 mark groups (the numbers in the commands above). You
|
||||
can control the colors used for these groups in :file:`kitty.conf` with::
|
||||
kitty prend en charge jusqu'à 3 groupes de marques (les nombres dans les
|
||||
commandes ci-dessus). Vous pouvez contrôler les couleurs utilisées pour ces
|
||||
groupes dans :file:`kitty.conf` avec ::
|
||||
|
||||
mark1_foreground red
|
||||
mark1_background gray
|
||||
@@ -39,89 +41,92 @@ can control the colors used for these groups in :file:`kitty.conf` with::
|
||||
|
||||
|
||||
.. note::
|
||||
For performance reasons, matching is done per line only, and only when that
|
||||
line is altered in any way. So you cannot match text that stretches across
|
||||
multiple lines.
|
||||
Pour des raisons de performance, la correspondance se fait ligne par ligne
|
||||
uniquement, et seulement lorsqu'une ligne est modifiée d'une manière ou
|
||||
d'une autre. Vous ne pouvez donc pas faire correspondre du texte réparti sur
|
||||
plusieurs lignes.
|
||||
|
||||
|
||||
Creating markers dynamically
|
||||
Créer des marqueurs dynamiquement
|
||||
---------------------------------
|
||||
|
||||
If you want to create markers dynamically rather than pre-defining them in
|
||||
:file:`kitty.conf`, you can do so as follows::
|
||||
Si vous voulez créer des marqueurs dynamiquement plutôt que de les prédéfinir
|
||||
dans :file:`kitty.conf`, vous pouvez le faire ainsi ::
|
||||
|
||||
map f1 create_marker
|
||||
map f2 remove_marker
|
||||
|
||||
Then pressing :kbd:`F1` will allow you to enter the marker definition and set it
|
||||
and pressing :kbd:`F2` will remove the marker. :ac:`create_marker` accepts the
|
||||
same syntax as :ac:`toggle_marker` above. Note that while creating markers, the
|
||||
prompt has history so you can easily re-use previous marker expressions.
|
||||
Appuyer sur :kbd:`F1` vous permettra alors de saisir la définition du marqueur
|
||||
et de la définir, et appuyer sur :kbd:`F2` supprimera le marqueur.
|
||||
:ac:`create_marker` accepte la même syntaxe que :ac:`toggle_marker` ci-dessus.
|
||||
Notez que lors de la création de marqueurs, l'invite dispose d'un historique,
|
||||
vous pouvez donc facilement réutiliser des expressions de marqueur précédentes.
|
||||
|
||||
You can also use the facilities for :doc:`remote-control` to dynamically add or
|
||||
remove markers.
|
||||
Vous pouvez aussi utiliser les facilités de :doc:`contrôle à distance
|
||||
<remote-control>` pour ajouter ou supprimer des marqueurs dynamiquement.
|
||||
|
||||
|
||||
Scrolling to marks
|
||||
Défiler jusqu'aux marques
|
||||
--------------------
|
||||
|
||||
kitty has a :ac:`scroll_to_mark` action to scroll to the next line that contains
|
||||
a mark. You can use it by mapping it to some shortcut in :file:`kitty.conf`::
|
||||
kitty dispose d'une action :ac:`scroll_to_mark` pour défiler jusqu'à la ligne
|
||||
suivante contenant une marque. Vous pouvez l'utiliser en l'associant à un
|
||||
raccourci dans :file:`kitty.conf` ::
|
||||
|
||||
map ctrl+p scroll_to_mark prev
|
||||
map ctrl+n scroll_to_mark next
|
||||
|
||||
Then pressing :kbd:`Ctrl+P` will scroll to the first line in the scrollback
|
||||
buffer above the current top line that contains a mark. Pressing :kbd:`Ctrl+N`
|
||||
will scroll to show the first line below the current last line that contains
|
||||
a mark. If you wish to jump to a mark of a specific type, you can add that to
|
||||
the mapping::
|
||||
Appuyer sur :kbd:`Ctrl+P` défilera alors jusqu'à la première ligne du tampon
|
||||
d'historique, au-dessus de la ligne du haut actuelle, contenant une marque.
|
||||
Appuyer sur :kbd:`Ctrl+N` défilera pour afficher la première ligne en dessous de
|
||||
la ligne du bas actuelle contenant une marque. Si vous souhaitez sauter à une
|
||||
marque d'un type particulier, vous pouvez l'ajouter à l'association ::
|
||||
|
||||
map ctrl+1 scroll_to_mark prev 1
|
||||
|
||||
Which will scroll only to marks of type 1.
|
||||
Ce qui ne défilera que vers les marques de type 1.
|
||||
|
||||
|
||||
The full syntax for creating marks
|
||||
La syntaxe complète pour créer des marques
|
||||
-------------------------------------
|
||||
|
||||
The syntax of the :ac:`toggle_marker` action is::
|
||||
La syntaxe de l'action :ac:`toggle_marker` est ::
|
||||
|
||||
toggle_marker <marker-type> <specification>
|
||||
|
||||
Here :code:`marker-type` is one of:
|
||||
Ici :code:`marker-type` vaut l'un des suivants :
|
||||
|
||||
* :code:`text` - Simple substring matching
|
||||
* :code:`itext` - Case-insensitive substring matching
|
||||
* :code:`regex` - A Python regular expression
|
||||
* :code:`iregex` - A case-insensitive Python regular expression
|
||||
* :code:`function` - An arbitrary function defined in a Python file, see :ref:`marker_funcs`.
|
||||
* :code:`text` - Correspondance simple de sous-chaîne
|
||||
* :code:`itext` - Correspondance de sous-chaîne insensible à la casse
|
||||
* :code:`regex` - Une expression régulière Python
|
||||
* :code:`iregex` - Une expression régulière Python insensible à la casse
|
||||
* :code:`function` - Une fonction arbitraire définie dans un fichier Python, voir :ref:`marker_funcs`.
|
||||
|
||||
.. _marker_funcs:
|
||||
|
||||
Arbitrary marker functions
|
||||
Fonctions de marqueur arbitraires
|
||||
-----------------------------
|
||||
|
||||
You can create your own marker functions. Create a Python file named
|
||||
:file:`mymarker.py` and in it create a :code:`marker` function. This function
|
||||
receives the text of the line as input and must yield three numbers,
|
||||
the starting character position, the ending character position and the mark
|
||||
group (1-3). For example:
|
||||
Vous pouvez créer vos propres fonctions de marqueur. Créez un fichier Python
|
||||
nommé :file:`mymarker.py` et, à l'intérieur, une fonction :code:`marker`. Cette
|
||||
fonction reçoit le texte de la ligne en entrée et doit produire trois nombres :
|
||||
la position du caractère de début, la position du caractère de fin et le groupe
|
||||
de marque (1-3). Par exemple :
|
||||
|
||||
.. code-block::
|
||||
.. code-block:: python
|
||||
|
||||
def marker(text):
|
||||
# Function to highlight the letter X
|
||||
# Fonction pour mettre en évidence la lettre X
|
||||
for i, ch in enumerate(text):
|
||||
if ch.lower() == 'x':
|
||||
yield i, i, 3
|
||||
|
||||
|
||||
Save this file somewhere and in :file:`kitty.conf`, use::
|
||||
Enregistrez ce fichier quelque part et, dans :file:`kitty.conf`, utilisez ::
|
||||
|
||||
map f1 toggle_marker function /path/to/mymarker.py
|
||||
|
||||
If you save the file in the :ref:`kitty config directory <confloc>`, you can
|
||||
use::
|
||||
Si vous enregistrez le fichier dans le :ref:`dossier de configuration de kitty
|
||||
<confloc>`, vous pouvez utiliser ::
|
||||
|
||||
map f1 toggle_marker function mymarker.py
|
||||
+97
-85
@@ -1,170 +1,182 @@
|
||||
Scripting the mouse click
|
||||
Script du clic de souris
|
||||
======================================================
|
||||
|
||||
|kitty| has support for :term:`terminal hyperlinks <hyperlinks>`. These are
|
||||
generated by many terminal programs, such as ``ls``, ``gcc``, ``systemd``,
|
||||
:ref:`tool_mcat`, etc. You can customize exactly what happens when clicking on
|
||||
these hyperlinks in |kitty|.
|
||||
|kitty| prend en charge les :term:`liens hypertextes du terminal <hyperlinks>`.
|
||||
Ils sont générés par de nombreux programmes de terminal, comme ``ls``, ``gcc``,
|
||||
``systemd``, :ref:`tool_mcat`, etc. Vous pouvez personnaliser exactement ce qui
|
||||
se passe lorsque vous cliquez sur ces liens dans |kitty|.
|
||||
|
||||
You can tell kitty to take arbitrarily many, complex actions when a link is
|
||||
clicked. Let us illustrate with some examples, first. Create the file
|
||||
:file:`~/.config/kitty/open-actions.conf` with the following:
|
||||
Vous pouvez demander à kitty d'effectuer autant d'actions complexes que vous
|
||||
voulez lors d'un clic sur un lien. Illustrons d'abord avec quelques exemples.
|
||||
Créez le fichier :file:`~/.config/kitty/open-actions.conf` avec ceci :
|
||||
|
||||
.. code:: conf
|
||||
|
||||
# Open any image in the full kitty window by clicking on it
|
||||
# Ouvre toute image dans la fenêtre kitty complète en cliquant dessus
|
||||
protocol file
|
||||
mime image/*
|
||||
action launch --type=overlay kitten icat --hold -- ${FILE_PATH}
|
||||
|
||||
Now, run ``ls --hyperlink=auto`` in kitty and click on the filename of an
|
||||
image, holding down :kbd:`ctrl+shift`. It will be opened over the current
|
||||
window. Press any key to close it.
|
||||
Lancez maintenant ``ls --hyperlink=auto`` dans kitty et cliquez sur le nom de
|
||||
fichier d'une image en maintenant :kbd:`ctrl+shift`. Elle s'ouvrira par-dessus
|
||||
la fenêtre courante. Appuyez sur n'importe quelle touche pour la fermer.
|
||||
|
||||
.. note::
|
||||
|
||||
The :program:`ls` comes with macOS does not support hyperlink, you need to
|
||||
install `GNU Coreutils <https://www.gnu.org/software/coreutils/>`__. If you
|
||||
install it via `Homebrew <https://formulae.brew.sh/formula/coreutils>`__, it
|
||||
will be :program:`gls`.
|
||||
Le :program:`ls` fourni avec macOS ne prend pas en charge les liens
|
||||
hypertextes, vous devez installer `GNU Coreutils
|
||||
<https://www.gnu.org/software/coreutils/>`__. Si vous l'installez via
|
||||
`Homebrew <https://formulae.brew.sh/formula/coreutils>`__, ce sera
|
||||
:program:`gls`.
|
||||
|
||||
Each entry in :file:`open-actions.conf` consists of one or more
|
||||
:ref:`matching_criteria`, such as ``protocol`` and ``mime`` and one or more
|
||||
``action`` entries. In the example above kitty uses the :doc:`launch <launch>`
|
||||
action which can be used to run external programs. Entries are separated by
|
||||
blank lines.
|
||||
Chaque entrée de :file:`open-actions.conf` se compose d'un ou plusieurs
|
||||
:ref:`critères de correspondance <matching_criteria>`, comme ``protocol`` et
|
||||
``mime``, et d'une ou plusieurs entrées ``action``. Dans l'exemple ci-dessus,
|
||||
kitty utilise l'action :doc:`launch <launch>` qui sert à lancer des programmes
|
||||
externes. Les entrées sont séparées par des lignes vides.
|
||||
|
||||
Actions are very powerful, anything that you can map to a key combination in
|
||||
:file:`kitty.conf` can be used as an action. You can specify more than one
|
||||
action per entry if you like, for example:
|
||||
Les actions sont très puissantes : tout ce que vous pouvez associer à une
|
||||
combinaison de touches dans :file:`kitty.conf` peut servir d'action. Vous pouvez
|
||||
indiquer plusieurs actions par entrée si vous le souhaitez, par exemple :
|
||||
|
||||
|
||||
.. code:: conf
|
||||
|
||||
# Tail a log file (*.log) in a new OS Window and reduce its font size
|
||||
# Suit un fichier de log (*.log) dans une nouvelle fenêtre OS et réduit sa taille de police
|
||||
protocol file
|
||||
ext log
|
||||
action launch --title ${FILE} --type=os-window tail -f -- ${FILE_PATH}
|
||||
action change_font_size current -2
|
||||
|
||||
|
||||
In the launch specification you can expand environment variables, as shown in
|
||||
the examples above. In addition to regular environment variables, there are
|
||||
some special variables, documented below:
|
||||
Dans la spécification launch, vous pouvez développer les variables
|
||||
d'environnement, comme montré dans les exemples ci-dessus. En plus des variables
|
||||
d'environnement habituelles, quelques variables spéciales existent, documentées
|
||||
ci-dessous :
|
||||
|
||||
``URL``
|
||||
The full URL being opened
|
||||
L'URL complète ouverte
|
||||
|
||||
``FILE_PATH``
|
||||
The path portion of the URL (unquoted)
|
||||
La partie chemin de l'URL (sans guillemets)
|
||||
|
||||
``FILE``
|
||||
The file portion of the path of the URL (unquoted)
|
||||
La partie fichier du chemin de l'URL (sans guillemets)
|
||||
|
||||
``FRAGMENT``
|
||||
The fragment (unquoted), if any of the URL or the empty string.
|
||||
Le fragment (sans guillemets), s'il existe dans l'URL, ou la chaîne vide.
|
||||
|
||||
``NETLOC``
|
||||
The net location aka hostname (unquoted), if any of the URL or the empty string.
|
||||
L'emplacement réseau, c'est-à-dire le nom d'hôte (sans guillemets), s'il
|
||||
existe dans l'URL, ou la chaîne vide.
|
||||
|
||||
``URL_PATH``
|
||||
The path, query and fragment portions of the URL, without any
|
||||
unquoting.
|
||||
Les parties chemin, requête et fragment de l'URL, sans aucun
|
||||
désséchappement.
|
||||
|
||||
``EDITOR``
|
||||
The terminal based text editor. The configured :opt:`editor` in
|
||||
:file:`kitty.conf` is preferred.
|
||||
L'éditeur de texte en mode terminal. L'option :opt:`editor` configurée dans
|
||||
:file:`kitty.conf` est préférée.
|
||||
|
||||
``SHELL``
|
||||
The path to the shell. The configured :opt:`shell` in :file:`kitty.conf` is
|
||||
preferred, without arguments.
|
||||
Le chemin du shell. L'option :opt:`shell` configurée dans
|
||||
:file:`kitty.conf` est préférée, sans arguments.
|
||||
|
||||
.. note::
|
||||
You can use the :opt:`action_alias` option just as in :file:`kitty.conf` to
|
||||
define aliases for frequently used actions.
|
||||
Vous pouvez utiliser l'option :opt:`action_alias` comme dans
|
||||
:file:`kitty.conf` pour définir des alias d'actions fréquemment utilisées.
|
||||
|
||||
|
||||
.. _matching_criteria:
|
||||
|
||||
Matching criteria
|
||||
Critères de correspondance
|
||||
------------------
|
||||
|
||||
An entry in :file:`open-actions.conf` must have one or more matching criteria.
|
||||
URLs that match all criteria for an entry will trigger that entry's actions.
|
||||
Processing stops at the first matching entry, so put more specific matching
|
||||
criteria at the start of the list. Entries in the file are separated by blank
|
||||
lines. The various available criteria are:
|
||||
Une entrée de :file:`open-actions.conf` doit avoir un ou plusieurs critères de
|
||||
correspondance. Les URL qui satisfont tous les critères d'une entrée déclenchent
|
||||
les actions de cette entrée. Le traitement s'arrête à la première entrée
|
||||
correspondante, placez donc les critères les plus spécifiques au début de la
|
||||
liste. Les entrées du fichier sont séparées par des lignes vides. Les différents
|
||||
critères disponibles sont :
|
||||
|
||||
``protocol``
|
||||
A comma separated list of protocols, for example: ``http, https``. If
|
||||
absent, there is no constraint on protocol.
|
||||
Une liste de protocoles séparés par des virgules, par exemple : ``http,
|
||||
https``. En son absence, il n'y a aucune contrainte de protocole.
|
||||
|
||||
``url``
|
||||
A regular expression that must match against the entire (unquoted) URL
|
||||
Une expression régulière qui doit correspondre à l'URL (sans guillemets)
|
||||
entière
|
||||
|
||||
``fragment_matches``
|
||||
A regular expression that must match against the fragment (part after #) in
|
||||
the URL
|
||||
Une expression régulière qui doit correspondre au fragment (la partie après
|
||||
#) de l'URL
|
||||
|
||||
``mime``
|
||||
A comma separated list of MIME types, for example: ``text/*, image/*,
|
||||
application/pdf``. You can add MIME types to kitty by creating a file named
|
||||
:file:`mime.types` in the :ref:`kitty configuration directory <confloc>`.
|
||||
Useful if your system MIME database does not have definitions you need. This
|
||||
file is in the standard format of one definition per line, like:
|
||||
``text/plain rst md``. Note that the MIME type for directories is
|
||||
``inode/directory``. MIME types are detected based on file name, not
|
||||
file contents. On Linux and BSD the system shared-mime-info database
|
||||
(:file:`mime/mime.cache` in the XDG data directories) is used.
|
||||
Une liste de types MIME séparés par des virgules, par exemple : ``text/*,
|
||||
image/*, application/pdf``. Vous pouvez ajouter des types MIME à kitty en
|
||||
créant un fichier nommé :file:`mime.types` dans le :ref:`dossier de
|
||||
configuration de kitty <confloc>`. Utile si la base MIME de votre système
|
||||
n'a pas les définitions dont vous avez besoin. Ce fichier utilise le format
|
||||
standard, à raison d'une définition par ligne, comme :
|
||||
``text/plain rst md``. Notez que le type MIME des dossiers est
|
||||
``inode/directory``. Les types MIME sont détectés d'après le nom du fichier,
|
||||
pas d'après son contenu. Sous Linux et BSD, la base partagée
|
||||
shared-mime-info du système (:file:`mime/mime.cache` dans les dossiers de
|
||||
données XDG) est utilisée.
|
||||
|
||||
``ext``
|
||||
A comma separated list of file extensions, for example: ``jpeg, tar.gz``
|
||||
Une liste d'extensions de fichiers séparées par des virgules, par exemple :
|
||||
``jpeg, tar.gz``
|
||||
|
||||
``file``
|
||||
A shell glob pattern that must match the filename, for example:
|
||||
``image-??.png``
|
||||
Un motif glob du shell qui doit correspondre au nom du fichier, par
|
||||
exemple : ``image-??.png``
|
||||
|
||||
``path``
|
||||
A shell glob pattern that must match the entire unquoted URL path, for
|
||||
example: ``/home/*/projects/*.py``. Both ``file`` and ``path`` matching
|
||||
ignore case.
|
||||
Un motif glob du shell qui doit correspondre au chemin complet de l'URL sans
|
||||
guillemets, par exemple : ``/home/*/projects/*.py``. Les correspondances
|
||||
``file`` et ``path`` ignorent la casse.
|
||||
|
||||
|
||||
.. _launch_actions:
|
||||
|
||||
Scripting the opening of files with kitty
|
||||
Script de l'ouverture de fichiers avec kitty
|
||||
-------------------------------------------------------
|
||||
|
||||
On macOS you can use :guilabel:`Open With` in Finder or drag and drop files and
|
||||
URLs onto the kitty dock icon to open them with kitty. Similarly on Linux, you
|
||||
can associate certain files types to open in kitty. The default actions are:
|
||||
Sous macOS, vous pouvez utiliser :guilabel:`Ouvrir avec` dans le Finder ou
|
||||
glisser-déposer des fichiers et des URL sur l'icône du dock de kitty pour les
|
||||
ouvrir avec kitty. De même sous Linux, vous pouvez associer certains types de
|
||||
fichiers à ouvrir dans kitty. Les actions par défaut sont :
|
||||
|
||||
* Open text files in your editor and images using the icat kitten.
|
||||
* Run shell scripts in a shell
|
||||
* Open SSH urls using the ssh command
|
||||
* Ouvrir les fichiers texte dans votre éditeur et les images avec le kitten icat.
|
||||
* Lancer les scripts shell dans un shell
|
||||
* Ouvrir les URL SSH avec la commande ssh
|
||||
|
||||
These actions can also be executed from the command line by running::
|
||||
Ces actions peuvent aussi être exécutées depuis la ligne de commande en
|
||||
lançant ::
|
||||
|
||||
kitty +open file_or_url another_url ...
|
||||
|
||||
# macOS only
|
||||
# macOS uniquement
|
||||
open -a kitty.app file_or_url another_url ...
|
||||
|
||||
Since macOS lacks an official interface to set default URL scheme handlers,
|
||||
kitty has a command you can use for it. The first argument for is the URL
|
||||
scheme, and the second optional argument is the bundle id of the app, which
|
||||
defaults to kitty, if not specified. For example:
|
||||
Comme macOS n'offre pas d'interface officielle pour définir les gestionnaires de
|
||||
schémas d'URL par défaut, kitty dispose d'une commande que vous pouvez utiliser
|
||||
pour cela. Le premier argument est le schéma d'URL, et le second argument
|
||||
facultatif est l'identifiant de bundle de l'application, qui vaut kitty par
|
||||
défaut s'il n'est pas indiqué. Par exemple :
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Set kitty as the handler for ssh:// URLs
|
||||
# Définit kitty comme gestionnaire des URL ssh://
|
||||
kitty +runpy 'from kitty.fast_data_types import cocoa_set_url_handler; import sys; cocoa_set_url_handler(*sys.argv[1:]); print("OK")' ssh
|
||||
# Set someapp as the handler for xyz:// URLs
|
||||
# Définit someapp comme gestionnaire des URL xyz://
|
||||
kitty +runpy 'from kitty.fast_data_types import cocoa_set_url_handler; import sys; cocoa_set_url_handler(*sys.argv[1:]); print("OK")' xyz someapp.bundle.identifier
|
||||
|
||||
You can customize these actions by creating a :file:`launch-actions.conf` file
|
||||
in the :ref:`kitty config directory <confloc>`, just like the
|
||||
:file:`open-actions.conf` file above. For example:
|
||||
Vous pouvez personnaliser ces actions en créant un fichier
|
||||
:file:`launch-actions.conf` dans le :ref:`dossier de configuration de kitty
|
||||
<confloc>`, exactement comme le fichier :file:`open-actions.conf` ci-dessus. Par
|
||||
exemple :
|
||||
|
||||
.. literalinclude:: ../kitty/open_actions.py
|
||||
:language: conf
|
||||
|
||||
+206
-172
@@ -1,40 +1,47 @@
|
||||
Overview
|
||||
Vue d'ensemble
|
||||
==============
|
||||
|
||||
Design philosophy
|
||||
-------------------
|
||||
Philosophie de conception
|
||||
-------------------------
|
||||
|
||||
|kitty| is designed for power keyboard users. To that end all its controls work
|
||||
with the keyboard (although it fully supports mouse interactions as well). Its
|
||||
configuration is a simple, human editable, single file for easy reproducibility
|
||||
(I like to store configuration in source control).
|
||||
|kitty| est conçu pour les utilisateurs intensifs du clavier. À cette fin,
|
||||
toutes ses commandes fonctionnent au clavier (bien qu'il prenne aussi
|
||||
pleinement en charge les interactions à la souris). Sa configuration est un
|
||||
fichier unique, simple et modifiable à la main, pour une reproductibilité
|
||||
facile (j'aime stocker la configuration dans un système de contrôle de
|
||||
versions).
|
||||
|
||||
The code in |kitty| is designed to be simple, modular and hackable. It is
|
||||
written in a mix of C (for performance sensitive parts), Python (for easy
|
||||
extensibility and flexibility of the UI) and Go (for the command line
|
||||
:term:`kittens`). It does not depend on any large and complex UI toolkit,
|
||||
using only OpenGL for rendering everything.
|
||||
Le code de |kitty| est conçu pour être simple, modulaire et bricolable. Il est
|
||||
écrit dans un mélange de C (pour les parties sensibles aux performances), de
|
||||
Python (pour l'extensibilité et la souplesse de l'interface) et de Go (pour les
|
||||
:term:`kittens` en ligne de commande). Il ne dépend d'aucune boîte à outils
|
||||
d'interface graphique volumineuse et complexe, et n'utilise qu'OpenGL pour tout
|
||||
dessiner.
|
||||
|
||||
Finally, |kitty| is designed from the ground up to support all modern terminal
|
||||
features, such as Unicode, true color, bold/italic fonts, text formatting, etc.
|
||||
It even extends existing text formatting escape codes, to add support for
|
||||
features not available elsewhere, such as colored and styled (curly) underlines.
|
||||
One of the design goals of |kitty| is to be easily extensible so that new
|
||||
features can be added in the future with relatively little effort.
|
||||
Enfin, |kitty| est conçu depuis le départ pour prendre en charge toutes les
|
||||
fonctionnalités modernes des terminaux, comme Unicode, les couleurs réelles,
|
||||
les polices grasses et italiques, le formatage du texte, etc. Il étend même
|
||||
les codes d'échappement de formatage existants pour ajouter la prise en charge
|
||||
de fonctionnalités indisponibles ailleurs, comme les soulignements colorés et
|
||||
stylés (ondulés). L'un des objectifs de conception de |kitty| est d'être
|
||||
facilement extensible, afin que de nouvelles fonctionnalités puissent être
|
||||
ajoutées à l'avenir avec relativement peu d'effort.
|
||||
|
||||
.. include:: basic.rst
|
||||
|
||||
|
||||
Configuring kitty
|
||||
-------------------
|
||||
Configurer kitty
|
||||
-----------------
|
||||
|
||||
|kitty| is highly configurable, everything from keyboard shortcuts to painting
|
||||
frames-per-second. Press :sc:`edit_config_file` in kitty to open its fully
|
||||
commented sample config file in your text editor. For details see the
|
||||
:doc:`configuration docs <conf>`.
|
||||
|kitty| est extrêmement configurable, des raccourcis clavier jusqu'au nombre
|
||||
d'images par seconde. Appuyez sur :sc:`edit_config_file` dans kitty pour ouvrir
|
||||
son fichier de configuration d'exemple entièrement commenté dans votre éditeur
|
||||
de texte. Pour les détails, voir la :doc:`documentation de configuration
|
||||
<conf>`.
|
||||
|
||||
You can quickly browse all available mappable actions by pressing
|
||||
:sc:`command_palette`, see :doc:`kittens/command-palette` for details.
|
||||
Vous pouvez parcourir rapidement toutes les actions associables disponibles en
|
||||
appuyant sur :sc:`command_palette`, voir :doc:`kittens/command-palette` pour
|
||||
les détails.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -44,70 +51,77 @@ You can quickly browse all available mappable actions by pressing
|
||||
|
||||
.. _layouts:
|
||||
|
||||
Layouts
|
||||
Dispositions
|
||||
----------
|
||||
|
||||
A :term:`layout` is an arrangement of multiple :term:`kitty windows <window>`
|
||||
inside a top-level :term:`OS window <os_window>`. The layout manages all its
|
||||
windows automatically, resizing and moving them as needed. You can create a new
|
||||
:term:`window` using the :sc:`new_window` key combination.
|
||||
Une :term:`disposition <layout>` est un agencement de plusieurs
|
||||
:term:`fenêtres kitty <window>` à l'intérieur d'une :term:`fenêtre OS
|
||||
<os_window>` de premier niveau. La disposition gère automatiquement toutes ses
|
||||
fenêtres, en les redimensionnant et en les déplaçant selon les besoins. Vous
|
||||
pouvez créer une nouvelle :term:`fenêtre <window>` avec la combinaison de
|
||||
touches :sc:`new_window`.
|
||||
|
||||
Currently, there are seven layouts available:
|
||||
Actuellement, sept dispositions sont disponibles :
|
||||
|
||||
* **Fat** -- One (or optionally more) windows are shown full width on the top,
|
||||
the rest of the windows are shown side-by-side on the bottom
|
||||
* **Fat** -- Une fenêtre (ou éventuellement plusieurs) est affichée sur toute
|
||||
la largeur en haut, le reste des fenêtres est affiché côte à côte en bas
|
||||
|
||||
* **Grid** -- All windows are shown in a grid
|
||||
* **Grid** -- Toutes les fenêtres sont affichées dans une grille
|
||||
|
||||
* **Horizontal** -- All windows are shown side-by-side
|
||||
* **Horizontal** -- Toutes les fenêtres sont affichées côte à côte
|
||||
|
||||
* **Splits** -- Windows arranged in arbitrary patterns created using horizontal
|
||||
and vertical splits
|
||||
* **Splits** -- Les fenêtres sont agencées selon des motifs arbitraires créés
|
||||
à l'aide de divisions horizontales et verticales
|
||||
|
||||
* **Stack** -- Only a single maximized window is shown at a time
|
||||
* **Stack** -- Une seule fenêtre maximisée est affichée à la fois
|
||||
|
||||
* **Tall** -- One (or optionally more) windows are shown full height on the
|
||||
left, the rest of the windows are shown one below the other on the right
|
||||
* **Tall** -- Une fenêtre (ou éventuellement plusieurs) est affichée sur toute
|
||||
la hauteur à gauche, le reste des fenêtres est affiché l'une sous l'autre à
|
||||
droite
|
||||
|
||||
* **Vertical** -- All windows are shown one below the other
|
||||
* **Vertical** -- Toutes les fenêtres sont affichées l'une sous l'autre
|
||||
|
||||
By default, all layouts are enabled and you can switch between layouts using
|
||||
the :sc:`next_layout` key combination. You can also create shortcuts to select
|
||||
particular layouts, and choose which layouts you want to enable, see
|
||||
:ref:`conf-kitty-shortcuts.layout` for examples. The first layout listed in
|
||||
:opt:`enabled_layouts` becomes the default layout.
|
||||
Par défaut, toutes les dispositions sont activées et vous pouvez passer de
|
||||
l'une à l'autre avec la combinaison de touches :sc:`next_layout`. Vous pouvez
|
||||
aussi créer des raccourcis pour choisir une disposition particulière et
|
||||
sélectionner les dispositions que vous voulez activer, voir
|
||||
:ref:`conf-kitty-shortcuts.layout` pour des exemples. La première disposition
|
||||
listée dans :opt:`enabled_layouts` devient la disposition par défaut.
|
||||
|
||||
For more details on the layouts and how to use them see :doc:`the documentation
|
||||
<layouts>`.
|
||||
Pour plus de détails sur les dispositions et leur utilisation, voir :doc:`la
|
||||
documentation <layouts>`.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
layouts
|
||||
|
||||
Extending kitty
|
||||
Étendre kitty
|
||||
------------------
|
||||
|
||||
kitty has a powerful framework for scripting. You can create small terminal
|
||||
programs called :doc:`kittens <kittens_intro>`. These can be used to add features
|
||||
to kitty, for example, :doc:`editing remote files <kittens/remote_file>` or
|
||||
:doc:`inputting Unicode characters <kittens/unicode_input>`. They can also be
|
||||
used to create programs that leverage kitty's powerful features, for example,
|
||||
:doc:`viewing images <kittens/icat>` or :doc:`diffing files with image support
|
||||
<kittens/diff>`.
|
||||
kitty dispose d'un puissant framework de script. Vous pouvez créer de petits
|
||||
programmes de terminal appelés :doc:`kittens <kittens_intro>`. Ils servent à
|
||||
ajouter des fonctionnalités à kitty, par exemple :doc:`éditer des fichiers
|
||||
distants <kittens/remote_file>` ou :doc:`saisir des caractères Unicode
|
||||
<kittens/unicode_input>`. Ils peuvent aussi servir à créer des programmes
|
||||
tirant parti des puissantes fonctionnalités de kitty, par exemple
|
||||
:doc:`visualiser des images <kittens/icat>` ou :doc:`comparer des fichiers avec
|
||||
prise en charge des images <kittens/diff>`.
|
||||
|
||||
You can :doc:`create your own kittens to scratch your own itches
|
||||
Vous pouvez :doc:`créer vos propres kittens pour répondre à vos besoins
|
||||
<kittens/custom>`.
|
||||
|
||||
For a list of all the builtin kittens, run ``kitten`` in kitty, or to browse
|
||||
some of the more prominent ones, see :ref:`see here <kittens>`.
|
||||
Pour la liste de tous les kittens intégrés, lancez ``kitten`` dans kitty, ou
|
||||
pour parcourir les plus importants, voir :ref:`voir ici <kittens>`.
|
||||
|
||||
Additionally, you can use the :ref:`watchers <Watchers>` framework
|
||||
to create Python scripts that run in response to various events such as windows
|
||||
being resized, closing, having their titles changed, etc.
|
||||
De plus, vous pouvez utiliser le framework des :ref:`watchers <Watchers>` pour
|
||||
créer des scripts Python qui s'exécutent en réponse à divers événements, comme
|
||||
le redimensionnement ou la fermeture des fenêtres, la modification de leur
|
||||
titre, etc.
|
||||
|
||||
Finally, there is remote control which allows you to control kitty from
|
||||
anywhere, even across a network! See below for more about remote control.
|
||||
Enfin, il existe le contrôle à distance qui permet de piloter kitty depuis
|
||||
n'importe où, même à travers un réseau ! Voir ci-dessous pour en savoir plus
|
||||
sur le contrôle à distance.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -115,15 +129,16 @@ anywhere, even across a network! See below for more about remote control.
|
||||
kittens_intro
|
||||
|
||||
|
||||
Remote control
|
||||
Contrôle à distance
|
||||
------------------
|
||||
|
||||
|kitty| has a very powerful system that allows you to control it from the
|
||||
:doc:`shell prompt, even over SSH <remote-control>`. You can change colors,
|
||||
fonts, open new :term:`windows <window>`, :term:`tabs <tab>`, set their titles,
|
||||
change window layout, get text from one window and send text to another, etc.
|
||||
The possibilities are endless. See the :doc:`tutorial <remote-control>` to get
|
||||
started.
|
||||
|kitty| dispose d'un système très puissant qui vous permet de le piloter
|
||||
depuis :doc:`l'invite du shell, même via SSH <remote-control>`. Vous pouvez
|
||||
changer les couleurs, les polices, ouvrir de nouvelles :term:`fenêtres
|
||||
<window>`, de nouveaux :term:`onglets <tab>`, définir leurs titres, changer la
|
||||
disposition des fenêtres, récupérer le texte d'une fenêtre et l'envoyer à une
|
||||
autre, etc. Les possibilités sont infinies. Voir le :doc:`tutoriel
|
||||
<remote-control>` pour démarrer.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -134,19 +149,21 @@ started.
|
||||
Sessions
|
||||
------------------
|
||||
|
||||
You can control the :term:`tabs <tab>`, :term:`kitty window <window>` layout,
|
||||
working directory, startup programs, etc. by creating a *session* file and using
|
||||
the :option:`kitty --session` command line flag or the :opt:`startup_session`
|
||||
option in :file:`kitty.conf`. You can also easily switch between sessions with
|
||||
a keypress. See :doc:`sessions` for details.
|
||||
Vous pouvez piloter les :term:`onglets <tab>`, la disposition des
|
||||
:term:`fenêtres kitty <window>`, le répertoire de travail, les programmes de
|
||||
démarrage, etc. en créant un fichier de *session* et en utilisant l'option de
|
||||
ligne de commande :option:`kitty --session` ou l'option
|
||||
:opt:`startup_session` dans :file:`kitty.conf`. Vous pouvez aussi passer
|
||||
facilement d'une session à l'autre avec une combinaison de touches. Voir
|
||||
:doc:`sessions` pour les détails.
|
||||
|
||||
|
||||
Creating tabs/windows
|
||||
Créer des onglets et des fenêtres
|
||||
-------------------------------
|
||||
|
||||
kitty can be told to run arbitrary programs in new :term:`tabs <tab>`,
|
||||
:term:`windows <window>` or :term:`overlays <overlay>` at a keypress.
|
||||
To learn how to do this, see :doc:`here <launch>`.
|
||||
kitty peut exécuter des programmes arbitraires dans de nouveaux :term:`onglets
|
||||
<tab>`, :term:`fenêtres <window>` ou :term:`surcouches <overlay>` sur une
|
||||
combinaison de touches. Pour apprendre comment faire, voir :doc:`ici <launch>`.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -154,119 +171,133 @@ To learn how to do this, see :doc:`here <launch>`.
|
||||
launch
|
||||
|
||||
|
||||
Mouse features
|
||||
Fonctionnalités de la souris
|
||||
-------------------
|
||||
|
||||
* You can click on a URL to open it in a browser.
|
||||
* You can double click to select a word and then drag to select more words.
|
||||
* You can triple click to select a line and then drag to select more lines.
|
||||
* You can triple click while holding :kbd:`Ctrl+Alt` to select from clicked
|
||||
point to end of line.
|
||||
* You can right click to extend a previous selection.
|
||||
* You can hold down :kbd:`Ctrl+Alt` and drag with the mouse to select in
|
||||
columns.
|
||||
* Selecting text automatically copies it to the primary clipboard (on platforms
|
||||
with a primary clipboard).
|
||||
* You can middle click to paste from the primary clipboard (on platforms with a
|
||||
primary clipboard).
|
||||
* You can right click while holding :kbd:`Ctrl+Shift` to open the output of the
|
||||
clicked on command in a pager (requires :ref:`shell_integration`)
|
||||
* You can select text with kitty even when a terminal program has grabbed the
|
||||
mouse by holding down the :kbd:`Shift` key
|
||||
* Vous pouvez cliquer sur une URL pour l'ouvrir dans un navigateur.
|
||||
* Vous pouvez double-cliquer pour sélectionner un mot, puis glisser pour
|
||||
sélectionner d'autres mots.
|
||||
* Vous pouvez triple-cliquer pour sélectionner une ligne, puis glisser pour
|
||||
sélectionner d'autres lignes.
|
||||
* Vous pouvez triple-cliquer en maintenant :kbd:`Ctrl+Alt` pour sélectionner du
|
||||
point cliqué jusqu'à la fin de la ligne.
|
||||
* Vous pouvez faire un clic droit pour étendre une sélection précédente.
|
||||
* Vous pouvez maintenir :kbd:`Ctrl+Alt` et glisser à la souris pour
|
||||
sélectionner en colonnes.
|
||||
* Sélectionner du texte le copie automatiquement dans le presse-papiers
|
||||
primaire (sur les plateformes disposant d'un presse-papiers primaire).
|
||||
* Vous pouvez cliquer avec le bouton du milieu pour coller depuis le
|
||||
presse-papiers primaire (sur les plateformes disposant d'un presse-papiers
|
||||
primaire).
|
||||
* Vous pouvez faire un clic droit en maintenant :kbd:`Ctrl+Shift` pour ouvrir
|
||||
la sortie de la commande cliquée dans un pager (nécessite
|
||||
:ref:`shell_integration`)
|
||||
* Vous pouvez sélectionner du texte avec kitty même lorsqu'un programme du
|
||||
terminal a accaparé la souris, en maintenant la touche :kbd:`Shift`
|
||||
|
||||
All these actions can be customized in :file:`kitty.conf` as described
|
||||
:ref:`here <conf-kitty-mouse.mousemap>`.
|
||||
Toutes ces actions sont personnalisables dans :file:`kitty.conf` comme décrit
|
||||
:ref:`ici <conf-kitty-mouse.mousemap>`.
|
||||
|
||||
You can also customize what happens when clicking on :term:`hyperlinks` in
|
||||
kitty, having it open files in your editor, download remote files, open things
|
||||
in your browser, etc. For details, see :doc:`here <open_actions>`.
|
||||
Vous pouvez aussi personnaliser ce qui se passe lorsque vous cliquez sur des
|
||||
:term:`liens hypertextes <hyperlinks>` dans kitty : les ouvrir dans votre
|
||||
éditeur, télécharger des fichiers distants, les ouvrir dans votre navigateur,
|
||||
etc. Pour les détails, voir :doc:`ici <open_actions>`.
|
||||
|
||||
Additionally, various bits of the kitty UI itself work with the mouse. You can
|
||||
drag and drop tabs in the tab bar to re-order them or move them from one OS
|
||||
Window to another, or even pop them out into a new OS Window. A tab containing a
|
||||
single window can also be dropped into the content area of another tab to insert
|
||||
its window at the highlighted edge.
|
||||
De plus, divers éléments de l'interface de kitty fonctionnent à la souris. Vous
|
||||
pouvez faire glisser des onglets dans la barre d'onglets pour les réorganiser
|
||||
ou les déplacer d'une fenêtre OS à une autre, ou même les détacher dans une
|
||||
nouvelle fenêtre OS. Un onglet contenant une seule fenêtre peut aussi être
|
||||
déposé dans la zone de contenu d'un autre onglet pour y insérer sa fenêtre sur
|
||||
le bord mis en évidence.
|
||||
|
||||
Dragging a tab in the tab bar shows an insertion marker at the position it
|
||||
will be dropped at, keeping the other tabs in place during the drag. When
|
||||
dragging a tab containing a single window, hover over another tab for 0.6
|
||||
seconds to switch to it, then keep dragging into its content area to choose a
|
||||
split position for the window before releasing the mouse.
|
||||
Faire glisser un onglet dans la barre d'onglets affiche un marqueur d'insertion
|
||||
à la position où il sera déposé, en laissant les autres onglets en place
|
||||
pendant le glissement. Lorsque vous faites glisser un onglet contenant une
|
||||
seule fenêtre, survolez un autre onglet pendant 0,6 seconde pour y basculer,
|
||||
puis continuez à glisser dans sa zone de contenu pour choisir une position de
|
||||
division pour la fenêtre avant de relâcher la souris.
|
||||
|
||||
When dragging a window, hovering over the middle of a tab also switches to it,
|
||||
and dropping the window there moves it into that tab. The outer 10% at either
|
||||
end of a tab, the gaps between tabs and the ends of the tab bar show an
|
||||
insertion marker instead. Dropping a window there puts it into a new tab at
|
||||
that position.
|
||||
Lorsque vous faites glisser une fenêtre, survoler le milieu d'un onglet y
|
||||
bascule aussi, et y déposer la fenêtre l'y déplace. Les 10 % extérieurs aux
|
||||
deux extrémités d'un onglet, les espaces entre les onglets et les extrémités de
|
||||
la barre d'onglets affichent plutôt un marqueur d'insertion. Y déposer une
|
||||
fenêtre la place dans un nouvel onglet à cette position.
|
||||
|
||||
You can drag window borders to resize windows. You can double click on empty regions
|
||||
of the tab bar to create new tabs or double click on an existing tab to rename
|
||||
it.
|
||||
Vous pouvez faire glisser les bordures des fenêtres pour les redimensionner.
|
||||
Vous pouvez double-cliquer sur les zones vides de la barre d'onglets pour créer
|
||||
de nouveaux onglets, ou double-cliquer sur un onglet existant pour le renommer.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
open_actions
|
||||
|
||||
Font control
|
||||
Contrôle des polices
|
||||
-----------------
|
||||
|
||||
|kitty| has extremely flexible and powerful font selection features. You can
|
||||
specify individual families for the regular, bold, italic and bold+italic fonts.
|
||||
You can even specify specific font families for specific ranges of Unicode
|
||||
characters. This allows precise control over text rendering. It can come in
|
||||
handy for applications like powerline, without the need to use patched fonts.
|
||||
See the various font related configuration directives in
|
||||
:ref:`conf-kitty-fonts`.
|
||||
|kitty| dispose de fonctionnalités de sélection de polices extrêmement
|
||||
souples et puissantes. Vous pouvez indiquer des familles individuelles pour
|
||||
les polices regular, bold, italic et bold+italic. Vous pouvez même indiquer des
|
||||
familles de polices précises pour des plages particulières de caractères
|
||||
Unicode. Cela permet un contrôle fin du rendu du texte. C'est pratique pour
|
||||
des applications comme powerline, sans avoir besoin d'utiliser des polices
|
||||
modifiées. Voir les différentes directives de configuration liées aux polices
|
||||
dans :ref:`conf-kitty-fonts`.
|
||||
|
||||
|
||||
.. _scrollback:
|
||||
|
||||
The scrollback buffer
|
||||
Le tampon d'historique
|
||||
-----------------------
|
||||
|
||||
|kitty| supports scrolling back to view history, just like most terminals. You
|
||||
can use either keyboard shortcuts or the mouse scroll wheel to do so. |kitty|
|
||||
displays an interactive :opt:`scrollbar` along the right edge
|
||||
of the window that shows your current position in the scrollback. You can click
|
||||
and drag the scrollbar to quickly navigate through the history.
|
||||
|kitty| prend en charge le défilement arrière pour consulter l'historique,
|
||||
comme la plupart des terminaux. Vous pouvez utiliser les raccourcis clavier ou
|
||||
la molette de la souris. |kitty| affiche une :opt:`barre de défilement`
|
||||
interactive le long du bord droit de la fenêtre, qui montre votre position
|
||||
actuelle dans l'historique. Vous pouvez cliquer et faire glisser la barre de
|
||||
défilement pour naviguer rapidement dans l'historique.
|
||||
|
||||
However, |kitty| has an extra, neat feature. Sometimes you need to explore the scrollback
|
||||
buffer in more detail, maybe search for some text or refer to it side-by-side
|
||||
while typing in a follow-up command. |kitty| allows you to do this by pressing
|
||||
the :sc:`show_scrollback` shortcut, which will open the scrollback buffer in
|
||||
your favorite pager program (which is :program:`less` by default). Colors and
|
||||
text formatting are preserved. You can explore the scrollback buffer comfortably
|
||||
within the pager.
|
||||
Cependant, |kitty| possède une fonctionnalité supplémentaire bien pratique.
|
||||
Parfois, vous avez besoin d'explorer le tampon d'historique plus en détail,
|
||||
peut-être pour chercher du texte ou vous y référer côte à côte pendant que vous
|
||||
tapez une commande de suivi. |kitty| vous permet de le faire en appuyant sur le
|
||||
raccourci :sc:`show_scrollback`, qui ouvre le tampon d'historique dans votre
|
||||
programme pager préféré (:program:`less` par défaut). Les couleurs et le
|
||||
formatage du texte sont préservés. Vous pouvez explorer confortablement le
|
||||
tampon d'historique dans le pager.
|
||||
|
||||
Additionally, you can pipe the contents of the scrollback buffer to an
|
||||
arbitrary, command running in a new :term:`window`, :term:`tab` or
|
||||
:term:`overlay`. For example::
|
||||
De plus, vous pouvez envoyer le contenu du tampon d'historique à une commande
|
||||
arbitraire exécutée dans une nouvelle :term:`fenêtre`, un nouvel :term:`onglet`
|
||||
ou une :term:`surcouche`. Par exemple ::
|
||||
|
||||
map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting less +G -R
|
||||
|
||||
Would open the scrollback buffer in a new :term:`window` when you press the
|
||||
:kbd:`F1` key. See :sc:`show_scrollback <show_scrollback>` for details.
|
||||
ouvrira le tampon d'historique dans une nouvelle :term:`fenêtre` lorsque vous
|
||||
appuyez sur la touche :kbd:`F1`. Voir :sc:`show_scrollback <show_scrollback>`
|
||||
pour les détails.
|
||||
|
||||
If you want to use it with an editor such as :program:`nvim` to get more powerful
|
||||
features, see for example, `kitty-scrollback.nvim
|
||||
<https://github.com/mikesmithgh/kitty-scrollback.nvim>`__ or `kitty-grab <https://github.com/yurikhan/kitty_grab>`__
|
||||
or see more tips for using various editor programs, in :iss:`this thread <719>`.
|
||||
Si vous voulez l'utiliser avec un éditeur comme :program:`nvim` pour obtenir
|
||||
des fonctionnalités plus puissantes, voir par exemple `kitty-scrollback.nvim
|
||||
<https://github.com/mikesmithgh/kitty-scrollback.nvim>`__ ou `kitty-grab
|
||||
<https://github.com/yurikhan/kitty_grab>`__, ou consultez d'autres astuces pour
|
||||
utiliser divers éditeurs dans :iss:`ce fil de discussion <719>`.
|
||||
|
||||
If you wish to store very large amounts of scrollback to view using the piping
|
||||
or :sc:`show_scrollback <show_scrollback>` features, you can use the
|
||||
:opt:`scrollback_pager_history_size` option.
|
||||
Si vous souhaitez conserver de très grandes quantités d'historique à consulter
|
||||
avec les fonctionnalités de redirection ou :sc:`show_scrollback
|
||||
<show_scrollback>`, vous pouvez utiliser l'option
|
||||
:opt:`scrollback_pager_history_size`.
|
||||
|
||||
|
||||
Integration with shells
|
||||
Intégration avec les shells
|
||||
---------------------------------
|
||||
|
||||
kitty has the ability to integrate closely within common shells, such as `zsh
|
||||
<https://www.zsh.org/>`__, `fish <https://fishshell.com>`__ and `bash
|
||||
<https://www.gnu.org/software/bash/>`__ to enable features such as jumping to
|
||||
previous prompts in the scrollback, viewing the output of the last command in
|
||||
:program:`less`, using the mouse to move the cursor while editing prompts, etc.
|
||||
See :doc:`shell-integration` for details.
|
||||
kitty peut s'intégrer étroitement aux shells courants, comme `zsh
|
||||
<https://www.zsh.org/>`__, `fish <https://fishshell.com>`__ et `bash
|
||||
<https://www.gnu.org/software/bash/>`__ pour activer des fonctionnalités comme
|
||||
le saut aux invites précédentes dans l'historique, la consultation de la sortie
|
||||
de la dernière commande dans :program:`less`, le déplacement du curseur à la
|
||||
souris pendant l'édition des invites, etc. Voir :doc:`shell-integration` pour
|
||||
les détails.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -275,27 +306,30 @@ See :doc:`shell-integration` for details.
|
||||
|
||||
.. _cpbuf:
|
||||
|
||||
Multiple copy/paste buffers
|
||||
Plusieurs tampons de copier/coller
|
||||
-----------------------------
|
||||
|
||||
In addition to being able to copy/paste from the system clipboard, in |kitty|
|
||||
you can also setup an arbitrary number of copy paste buffers. To do so, simply
|
||||
add something like the following to your :file:`kitty.conf`::
|
||||
En plus du copier/coller depuis le presse-papiers du système, vous pouvez
|
||||
configurer dans |kitty| un nombre arbitraire de tampons de copier/coller. Pour
|
||||
ce faire, ajoutez simplement quelque chose comme ce qui suit à votre
|
||||
:file:`kitty.conf` ::
|
||||
|
||||
map f1 copy_to_buffer a
|
||||
map f2 paste_from_buffer a
|
||||
|
||||
This will allow you to press :kbd:`F1` to copy the current selection to an
|
||||
internal buffer named ``a`` and :kbd:`F2` to paste from that buffer. The buffer
|
||||
names are arbitrary strings, so you can define as many such buffers as you need.
|
||||
Cela vous permettra d'appuyer sur :kbd:`F1` pour copier la sélection courante
|
||||
dans un tampon interne nommé ``a`` et sur :kbd:`F2` pour coller depuis ce
|
||||
tampon. Les noms de tampons sont des chaînes arbitraires, vous pouvez donc
|
||||
définir autant de tampons que nécessaire.
|
||||
|
||||
|
||||
Marks
|
||||
Marques
|
||||
-------------
|
||||
|
||||
kitty has the ability to mark text on the screen based on regular expressions.
|
||||
This can be useful to highlight words or phrases when browsing output from long
|
||||
running programs or similar. To learn how this feature works, see :doc:`marks`.
|
||||
kitty peut marquer du texte à l'écran à partir d'expressions régulières. C'est
|
||||
utile pour mettre en évidence des mots ou des phrases lors de la lecture de la
|
||||
sortie de programmes longs. Pour apprendre comment fonctionne cette
|
||||
fonctionnalité, voir :doc:`marks`.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
+96
-86
@@ -1,78 +1,83 @@
|
||||
Performance
|
||||
===================
|
||||
|
||||
The main goals for |kitty| performance are user perceived latency while typing
|
||||
and "smoothness" while scrolling as well as CPU usage. |kitty| tries hard to
|
||||
find an optimum balance for these. To that end it keeps a cache of each
|
||||
rendered glyph in video RAM so that font rendering is not a bottleneck.
|
||||
Interaction with child programs takes place in a separate thread from
|
||||
rendering, to improve smoothness. Parsing of the byte stream is done using
|
||||
`vector CPU instructions
|
||||
<https://en.wikipedia.org/wiki/Single_instruction,_multiple_data>`__ for
|
||||
maximum performance. Updates to the screen typically require sending just a few
|
||||
bytes to the GPU.
|
||||
Les principaux objectifs de performance de |kitty| sont la latence perçue par
|
||||
l'utilisateur pendant la frappe, la « fluidité » pendant le défilement, ainsi
|
||||
que l'utilisation du processeur. |kitty| s'efforce de trouver un équilibre
|
||||
optimal entre ces éléments. À cette fin, il conserve un cache de chaque glyphe
|
||||
dessiné dans la mémoire vidéo, afin que le rendu des polices ne soit pas un
|
||||
goulot d'étranglement. L'interaction avec les programmes enfants se fait dans un
|
||||
thread distinct du rendu, pour améliorer la fluidité. L'analyse du flux d'octets
|
||||
est effectuée à l'aide d'`instructions vectorielles du processeur
|
||||
<https://fr.wikipedia.org/wiki/Single_instruction,_multiple_data>`__ pour des
|
||||
performances maximales. Les mises à jour de l'écran ne nécessitent
|
||||
généralement que l'envoi de quelques octets au GPU.
|
||||
|
||||
There are two config options you can tune to adjust the performance,
|
||||
:opt:`repaint_delay` and :opt:`input_delay`. These control the artificial delays
|
||||
introduced into the render loop to reduce CPU usage. See
|
||||
:ref:`conf-kitty-performance` for details. See also the :opt:`sync_to_monitor`
|
||||
option to further decrease latency at the cost of some `screen tearing
|
||||
<https://en.wikipedia.org/wiki/Screen_tearing>`__ while scrolling.
|
||||
Deux options de configuration vous permettent d'ajuster les performances :
|
||||
:opt:`repaint_delay` et :opt:`input_delay`. Elles contrôlent les délais
|
||||
artificiels introduits dans la boucle de rendu afin de réduire l'utilisation du
|
||||
processeur. Voir :ref:`conf-kitty-performance` pour les détails. Voir aussi
|
||||
l'option :opt:`sync_to_monitor` pour réduire encore la latence au prix d'un peu
|
||||
de `déchirure d'écran <https://fr.wikipedia.org/wiki/Tearing>`__ pendant le
|
||||
défilement.
|
||||
|
||||
Benchmarks
|
||||
-------------
|
||||
|
||||
Measuring terminal emulator performance is fairly subtle, there are three main
|
||||
axes on which performance is measured: Energy usage for typical tasks,
|
||||
Keyboard to screen latency, and throughput (processing large amounts of data).
|
||||
Mesurer les performances d'un émulateur de terminal est assez subtil ; il y a
|
||||
trois axes principaux sur lesquels on mesure les performances : la consommation
|
||||
d'énergie pour les tâches courantes, la latence entre le clavier et l'écran, et
|
||||
le débit (traitement de grandes quantités de données).
|
||||
|
||||
Keyboard to screen latency
|
||||
Latence entre le clavier et l'écran
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is measured either with dedicated hardware, or software such as `Typometer
|
||||
<https://pavelfatin.com/typometer/>`__. Third party measurements comparing
|
||||
kitty with other terminal emulators on various systems show kitty has best in
|
||||
class keyboard to screen latency.
|
||||
Elle se mesure soit avec du matériel dédié, soit avec des logiciels comme
|
||||
`Typometer <https://pavelfatin.com/typometer/>`__. Les mesures de tiers
|
||||
comparant kitty à d'autres émulateurs de terminal sur divers systèmes montrent
|
||||
que kitty offre une latence clavier-écran parmi les meilleures de sa catégorie.
|
||||
|
||||
Note that to minimize latency at the expense of more energy usage, use the
|
||||
following settings in kitty.conf::
|
||||
Notez que pour minimiser la latence au prix d'une consommation d'énergie plus
|
||||
élevée, utilisez les réglages suivants dans kitty.conf ::
|
||||
|
||||
input_delay 0
|
||||
repaint_delay 2
|
||||
sync_to_monitor no
|
||||
wayland_enable_ime no
|
||||
|
||||
`Hardware based measurement on macOS
|
||||
<https://thume.ca/2020/05/20/making-a-latency-tester/>`__ show that kitty and
|
||||
Apple's Terminal.app share the crown for best latency. These
|
||||
measurements were done with :opt:`input_delay` at its default value of ``3 ms``
|
||||
which means kitty's actual numbers would be even lower.
|
||||
Les `mesures matérielles sous macOS
|
||||
<https://thume.ca/2020/05/20/making-a-latency-tester/>`__ montrent que kitty et
|
||||
Terminal.app d'Apple se partagent la couronne de la meilleure latence. Ces
|
||||
mesures ont été effectuées avec :opt:`input_delay` à sa valeur par défaut de
|
||||
``3 ms``, ce qui signifie que les chiffres réels de kitty seraient encore
|
||||
meilleurs.
|
||||
|
||||
`Typometer based measurements on Linux
|
||||
Les `mesures avec Typometer sous Linux
|
||||
<https://github.com/kovidgoyal/kitty/issues/2701#issuecomment-911089374>`__
|
||||
show that kitty has far and away the best latency of the terminals tested.
|
||||
montrent que kitty a de loin la meilleure latence des terminaux testés.
|
||||
|
||||
.. _throughput:
|
||||
|
||||
Throughput
|
||||
Débit
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
kitty has a builtin kitten to measure throughput, it works by dumping large
|
||||
amounts of data of different types into the tty device and measuring how fast
|
||||
the terminal parses and responds to it. The measurements below were taken with
|
||||
the same font, font size and window size for all terminals, and default
|
||||
settings, on the same computer. They clearly show kitty has the fastest
|
||||
throughput. To run the tests yourself, run ``kitten __benchmark__`` in the
|
||||
terminal emulator you want to test, where the kitten binary is part of the
|
||||
kitty install.
|
||||
kitty intègre un kitten permettant de mesurer le débit : il envoie de grandes
|
||||
quantités de données de différents types au périphérique tty et mesure la
|
||||
vitesse avec laquelle le terminal les analyse et y répond. Les mesures
|
||||
ci-dessous ont été prises avec la même police, la même taille de police et la
|
||||
même taille de fenêtre pour tous les terminaux, avec les réglages par défaut,
|
||||
sur le même ordinateur. Elles montrent clairement que kitty a le débit le plus
|
||||
élevé. Pour lancer les tests vous-même, exécutez ``kitten __benchmark__`` dans
|
||||
l'émulateur de terminal que vous voulez tester, le binaire kitten faisant
|
||||
partie de l'installation de kitty.
|
||||
|
||||
The numbers are megabytes per second of data that the terminal
|
||||
processes. Measurements were taken under Linux/X11 with an ``AMD Ryzen 7 PRO
|
||||
5850U``. Entries are in order of decreasing performance. kitty is twice
|
||||
as fast as the next best.
|
||||
Les chiffres sont des mégaoctets par seconde de données traitées par le
|
||||
terminal. Les mesures ont été prises sous Linux/X11 avec un ``AMD Ryzen 7 PRO
|
||||
5850U``. Les entrées sont classées par performances décroissantes. kitty est
|
||||
deux fois plus rapide que le deuxième meilleur.
|
||||
|
||||
================ ====== ======= ===== ====== =======
|
||||
Terminal ASCII Unicode CSI Images Average
|
||||
Terminal ASCII Unicode CSI Images Moyenne
|
||||
================ ====== ======= ===== ====== =======
|
||||
kitty 0.33 121.8 105.0 59.8 251.6 134.55
|
||||
gnometerm 3.50.1 33.4 55.0 16.1 142.8 61.83
|
||||
@@ -83,74 +88,79 @@ konsole 23.08.04 25.2 37.7 23.6 23.4 27.48
|
||||
alacritty+tmux 30.3 7.8 14.7 46.1 24.73
|
||||
================ ====== ======= ===== ====== =======
|
||||
|
||||
In this table, each column represents different types of data. The CSI column
|
||||
is for data consisting of a mix of typical formatting escape codes and some
|
||||
ASCII only text.
|
||||
Dans ce tableau, chaque colonne représente différents types de données. La
|
||||
colonne CSI concerne des données constituées d'un mélange de codes
|
||||
d'échappement de formatage typiques et de texte uniquement ASCII.
|
||||
|
||||
.. note::
|
||||
|
||||
By default, the benchmark kitten suppresses actual rendering, to better
|
||||
focus on parser speed, you can pass it the ``--render`` flag to not suppress
|
||||
rendering. However, modern terminals typically render asynchronously,
|
||||
therefore the numbers are not really useful for comparison, as it is just a
|
||||
game about how much input to *batch* before rendering the next frame.
|
||||
However, even with rendering enabled kitty is still faster than all the
|
||||
rest. For brevity those numbers are not included.
|
||||
Par défaut, le kitten de benchmark supprime le rendu réel afin de se
|
||||
concentrer sur la vitesse de l'analyseur ; vous pouvez lui passer l'option
|
||||
``--render`` pour ne pas supprimer le rendu. Cependant, les terminaux
|
||||
modernes dessinent généralement de façon asynchrone, donc les chiffres ne
|
||||
sont pas vraiment utiles pour la comparaison, car il s'agit juste de savoir
|
||||
combien d'entrées *regrouper* avant de dessiner l'image suivante. Toutefois,
|
||||
même avec le rendu activé, kitty reste plus rapide que tous les autres. Par
|
||||
souci de concision, ces chiffres ne sont pas inclus.
|
||||
|
||||
.. note::
|
||||
|
||||
foot, iterm2 and Terminal.app are left out as they do not run under X11.
|
||||
Alacritty+tmux is included just to show the effect of putting a terminal
|
||||
multiplexer into the mix (halving throughput) and because alacritty isn't
|
||||
remotely comparable to any of the other terminals feature wise without tmux.
|
||||
foot, iterm2 et Terminal.app sont omis car ils ne fonctionnent pas sous X11.
|
||||
Alacritty+tmux est inclus uniquement pour montrer l'effet de l'ajout d'un
|
||||
multiplexeur de terminal dans l'équation (débit divisé par deux) et parce
|
||||
qu'alacritty n'est pas du tout comparable aux autres terminaux en termes de
|
||||
fonctionnalités sans tmux.
|
||||
|
||||
.. note::
|
||||
|
||||
konsole, gnome-terminal and xterm do not support the `Synchronized update
|
||||
konsole, gnome-terminal et xterm ne prennent pas en charge le code
|
||||
d'échappement de `mise à jour synchronisée
|
||||
<https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec>`__
|
||||
escape code used to suppress rendering, if and when they gain support for it
|
||||
their numbers are likely to improve by ``20 - 50%``, depending on how well they
|
||||
implement it.
|
||||
utilisé pour supprimer le rendu ; s'ils venaient à le prendre en charge,
|
||||
leurs chiffres s'amélioreraient probablement de ``20 - 50%``, selon la
|
||||
qualité de leur implémentation.
|
||||
|
||||
|
||||
Energy usage
|
||||
Consommation d'énergie
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Sadly, I do not have the infrastructure to measure actual energy usage so CPU
|
||||
usage will have to stand in for it. Here are some CPU usage numbers for the
|
||||
task of scrolling a file continuously in :program:`less`. The CPU usage is for
|
||||
the terminal process and X together and is measured using :program:`htop`. The
|
||||
measurements are taken at the same font and window size for all terminals on a
|
||||
``Intel(R) Core(TM) i7-4820K CPU @ 3.70GHz`` CPU with a ``Advanced Micro
|
||||
Devices, Inc. [AMD/ATI] Cape Verde XT [Radeon HD 7770/8760 / R7 250X]`` GPU.
|
||||
Malheureusement, je n'ai pas l'infrastructure pour mesurer la consommation
|
||||
d'énergie réelle, l'utilisation du processeur devra donc la représenter. Voici
|
||||
quelques chiffres d'utilisation du processeur pour la tâche consistant à faire
|
||||
défiler un fichier en continu dans :program:`less`. L'utilisation du processeur
|
||||
concerne le processus du terminal et X ensemble et est mesurée avec
|
||||
:program:`htop`. Les mesures ont été prises avec la même police et la même
|
||||
taille de fenêtre pour tous les terminaux sur un processeur ``Intel(R) Core(TM)
|
||||
i7-4820K CPU @ 3.70GHz`` avec un GPU ``Advanced Micro Devices, Inc.
|
||||
[AMD/ATI] Cape Verde XT [Radeon HD 7770/8760 / R7 250X]``.
|
||||
|
||||
============== =========================
|
||||
Terminal CPU usage (X + terminal)
|
||||
============== =========================
|
||||
============== ============================
|
||||
Terminal Utilisation CPU (X + terminal)
|
||||
============== ============================
|
||||
|kitty| 6 - 8%
|
||||
xterm 5 - 7% (but scrolling was extremely janky)
|
||||
xterm 5 - 7% (mais le défilement était extrêmement saccadé)
|
||||
termite 10 - 13%
|
||||
urxvt 12 - 14%
|
||||
gnome-terminal 15 - 17%
|
||||
konsole 29 - 31%
|
||||
============== =========================
|
||||
============== ============================
|
||||
|
||||
As you can see, |kitty| uses much less CPU than all terminals, except xterm, but
|
||||
its scrolling "smoothness" is much better than that of xterm (at least to my,
|
||||
admittedly biased, eyes).
|
||||
Comme vous pouvez le voir, |kitty| utilise bien moins de processeur que tous
|
||||
les terminaux, sauf xterm, mais sa « fluidité » de défilement est bien
|
||||
meilleure que celle d'xterm (du moins à mes yeux, il est vrai, subjectifs).
|
||||
|
||||
Instrumenting kitty
|
||||
Instrumenter kitty
|
||||
-----------------------
|
||||
|
||||
To profile kitty performance on Linux, first install ``perf`` and run::
|
||||
Pour profiler les performances de kitty sous Linux, installez d'abord ``perf``
|
||||
et lancez ::
|
||||
|
||||
sudo setcap cap_sys_admin,cap_sys_ptrace,cap_syslog=ep /usr/bin/perf
|
||||
|
||||
Then build kitty with::
|
||||
Compilez ensuite kitty avec ::
|
||||
|
||||
make profile
|
||||
|
||||
Finally get benchmark and profiling results using::
|
||||
Enfin, obtenez les résultats de benchmark et de profilage avec ::
|
||||
|
||||
./benchmark.py --perf
|
||||
|
||||
+15
-14
@@ -1,21 +1,22 @@
|
||||
Support kitty development ❤️
|
||||
Soutenez le développement de kitty ❤️
|
||||
==============================
|
||||
|
||||
My goal with |kitty| is to move the stagnant terminal ecosystem forward. To that
|
||||
end kitty has many foundational features, such as: :doc:`image support
|
||||
<graphics-protocol>`, :doc:`superlative performance <performance>`,
|
||||
:doc:`various enhancements to the terminal protocol <protocol-extensions>`,
|
||||
etc. These features allow the development of rich terminal applications, such
|
||||
as :doc:`Side-by-side diff <kittens/diff>` and :doc:`Unicode input
|
||||
<kittens/unicode_input>`.
|
||||
Mon objectif avec |kitty| est de faire avancer l'écosystème stagnant des
|
||||
terminaux. Dans cette optique, kitty possède de nombreuses fonctionnalités
|
||||
fondamentales, telles que : :doc:`la prise en charge des images
|
||||
<graphics-protocol>`, :doc:`des performances inégalées <performance>`,
|
||||
:doc:`diverses améliorations du protocole des terminaux <protocol-extensions>`,
|
||||
etc. Ces fonctionnalités permettent le développement d'applications de terminal
|
||||
riches, comme :doc:`le diff côte à côte <kittens/diff>` et :doc:`la saisie
|
||||
Unicode <kittens/unicode_input>`.
|
||||
|
||||
If you wish to support this mission and see the terminal ecosystem evolve,
|
||||
consider donating so that I can devote more time to |kitty| development.
|
||||
I have personally written `almost all kitty code
|
||||
<https://github.com/kovidgoyal/kitty/graphs/contributors>`_.
|
||||
Si vous souhaitez soutenir cette mission et voir évoluer l'écosystème des
|
||||
terminaux, envisagez un don afin que je puisse consacrer plus de temps au
|
||||
développement de |kitty|. J'ai personnellement écrit `presque tout le code de
|
||||
kitty <https://github.com/kovidgoyal/kitty/graphs/contributors>`_.
|
||||
|
||||
You can choose to make either a one-time payment via PayPal or become a
|
||||
*patron* of kitty development via one of the services below:
|
||||
Vous pouvez choisir d'effectuer un paiement unique via PayPal ou de devenir
|
||||
*patron* du développement de kitty via l'un des services ci-dessous :
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
||||
Reference in new issue
Block a user