binary.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. Install kitty
  2. ========================
  3. Binary install
  4. ----------------
  5. .. highlight:: sh
  6. You can install pre-built binaries of |kitty| if you are on macOS or Linux using
  7. the following simple command:
  8. .. code-block:: sh
  9. _kitty_install_cmd
  10. The binaries will be installed in the standard location for your OS,
  11. :file:`/Applications/kitty.app` on macOS and :file:`~/.local/kitty.app` on
  12. Linux. The installer only touches files in that directory. To update kitty,
  13. simply re-run the command.
  14. .. warning::
  15. **Do not** copy the kitty binary out of the installation folder. If you want
  16. to add it to your :envvar:`PATH`, create a symlink in :file:`~/.local/bin` or
  17. :file:`/usr/bin` or wherever. You should create a symlink for the :file:`kitten`
  18. binary as well.
  19. Manually installing
  20. ---------------------
  21. If something goes wrong or you simply do not want to run the installer, you can
  22. manually download and install |kitty| from the `GitHub releases page
  23. <https://github.com/kovidgoyal/kitty/releases>`__. If you are on macOS, download
  24. the :file:`.dmg` and install as normal. If you are on Linux, download the
  25. tarball and extract it into a directory. The |kitty| executable will be in the
  26. :file:`bin` sub-directory.
  27. Desktop integration on Linux
  28. --------------------------------
  29. If you want the kitty icon to appear in the taskbar and an entry for it to be
  30. present in the menus, you will need to install the :file:`kitty.desktop` file.
  31. The details of the following procedure may need to be adjusted for your
  32. particular desktop, but it should work for most major desktop environments.
  33. .. code-block:: sh
  34. # Create symbolic links to add kitty and kitten to PATH (assuming ~/.local/bin is in
  35. # your system-wide PATH)
  36. ln -sf ~/.local/kitty.app/bin/kitty ~/.local/kitty.app/bin/kitten ~/.local/bin/
  37. # Place the kitty.desktop file somewhere it can be found by the OS
  38. cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/
  39. # If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file
  40. cp ~/.local/kitty.app/share/applications/kitty-open.desktop ~/.local/share/applications/
  41. # Update the paths to the kitty and its icon in the kitty desktop file(s)
  42. sed -i "s|Icon=kitty|Icon=$(readlink -f ~)/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" ~/.local/share/applications/kitty*.desktop
  43. sed -i "s|Exec=kitty|Exec=$(readlink -f ~)/.local/kitty.app/bin/kitty|g" ~/.local/share/applications/kitty*.desktop
  44. # Make xdg-terminal-exec (and hence desktop environments that support it use kitty)
  45. echo 'kitty.desktop' > ~/.config/xdg-terminals.list
  46. .. note::
  47. In :file:`kitty-open.desktop`, kitty is registered to handle some supported
  48. MIME types. This will cause kitty to take precedence on some systems where
  49. the default apps are not explicitly set. For example, if you expect to use
  50. other GUI file managers to open dir paths when using commands such as
  51. :program:`xdg-open`, you should configure the default opener for the MIME
  52. type ``inode/directory``::
  53. xdg-mime default org.kde.dolphin.desktop inode/directory
  54. .. note::
  55. If you use the venerable `stow <https://www.gnu.org/software/stow/>`__
  56. command to manage your manual installations, the following takes care of the
  57. above for you (use with :code:`dest=~/.local/stow`)::
  58. cd ~/.local/stow
  59. stow -v kitty.app
  60. Customizing the installation
  61. --------------------------------
  62. .. _nightly:
  63. * You can install the latest nightly kitty build with ``installer``:
  64. .. code-block:: sh
  65. _kitty_install_cmd \
  66. installer=nightly
  67. If you want to install it in parallel to the released kitty specify a
  68. different install locations with ``dest``:
  69. .. code-block:: sh
  70. _kitty_install_cmd \
  71. installer=nightly dest=/some/other/location
  72. * You can specify a different install location, with ``dest``:
  73. .. code-block:: sh
  74. _kitty_install_cmd \
  75. dest=/some/other/location
  76. * You can tell the installer not to launch |kitty| after installing it with
  77. ``launch=n``:
  78. .. code-block:: sh
  79. _kitty_install_cmd \
  80. launch=n
  81. * You can use a previously downloaded dmg/tarball, with ``installer``:
  82. .. code-block:: sh
  83. _kitty_install_cmd \
  84. installer=/path/to/dmg or tarball
  85. Uninstalling
  86. ----------------
  87. All the installer does is copy the kitty files into the install directory. To
  88. uninstall, simply delete that directory.
  89. Building from source
  90. ------------------------
  91. |kitty| is easy to build from source, follow the :doc:`instructions <build>`.