Jump to content

Kitty: Difference between revisions

From NixOS Wiki
Dander (talk | contribs)
m remove unnecessary description (see MoS), clean up heading and outdated configuration
Zimward (talk | contribs)
m Add reference to Stylix as there is currently no wiki page for it
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://sw.kovidgoyal.net/kitty/ Kitty] is a modern, fast, GPU-based terminal emulator that leverages modern graphics hardware for high performance.
<languages/>
<translate>
<!--T:1-->
'''Kitty''' is a modern, fast, GPU-based terminal emulator written in Python and C. It leverages graphics hardware for high performance and offers features like tabs, layouts, and GPU-based rendering. Kitty is available in the NixOS ecosystem and can be configured through various methods.<ref>https://sw.kovidgoyal.net/kitty/</ref>
</translate>


== Installation ==
== Installation ==


==== With nix-shell ====
 
<syntaxhighlight lang="bash" start="3">
==== Shell ====
 
<translate>
<!--T:2-->
To temporarily use Kitty in a shell environment, you can run:
</translate>
<syntaxhighlight lang="bash">
nix-shell -p kitty
nix-shell -p kitty
</syntaxhighlight>
</syntaxhighlight>


==== With NixOS ====
<translate>
<syntaxhighlight lang="nixos">
<!--T:3-->
environment.systemPackages = [
This will provide a shell with Kitty available without adding it to your system configuration.
  pkgs.kitty
</translate>
 
==== System setup ====
 
<translate>
<!--T:4-->
To install Kitty, add it to either the system-wide <code>environment.systemPackages</code> in <code>/etc/nixos/configuration.nix</code> or to the user-specific <code>home.packages</code> in <code>~/.config/nixpkgs/home.nix</code>.<ref>https://nixos.org/manual/nixos/stable/</ref>
</translate>
<syntaxhighlight lang="nix">
# System-wide installation (in /etc/nixos/configuration.nix)
environment.systemPackages = with pkgs; [
  kitty
];
 
# User-specific installation (in ~/.config/nixpkgs/home.nix)
home.packages = with pkgs; [
  kitty
];
];
</syntaxhighlight>
</syntaxhighlight>
<translate>
<!--T:5-->
Then, rebuild your system or apply your Home Manager configuration:
</translate>
<syntaxhighlight lang="bash">
# For system-wide installation
sudo nixos-rebuild switch
# For Home Manager
home-manager switch
</syntaxhighlight>
== Configuration ==
== Configuration ==


=== Using NixOS ===
NixOS does not include a module for Kitty, it is necessary to manually replicate the steps from [https://sw.kovidgoyal.net/kitty/conf/ Kitty's official documentation].


=== Using Home Manager ===
==== Basic ====


==== Basic ====
<translate>
<!--T:6-->
NixOS does not include a native module for Kitty. For basic Kitty configuration on NixOS, you need to manually follow the steps from Kitty's documentation.<ref>https://sw.kovidgoyal.net/kitty/conf/</ref>
</translate>
 
<translate>
<!--T:7-->
If you're using Home Manager, you can enable Kitty with a simple configuration:
</translate>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.kitty.enable = true;
programs.kitty.enable = true;
Line 27: Line 72:


==== Advanced ====
==== Advanced ====
<translate>
<!--T:8-->
For more advanced Home Manager configuration, you can specify various Kitty settings:
</translate>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.kitty = lib.mkForce {
programs.kitty = lib.mkForce {
Line 65: Line 115:
</syntaxhighlight>
</syntaxhighlight>


== Tips and Tricks ==
== Tips and tricks ==
 
<translate>
=== Theming with Stylix === <!--T:stylix-->


==== Using Stylix to theme Kitty ====
<!--T:11-->
[[Stylix]] has a built-in integration for Kitty:<syntaxhighlight lang="nix">
You can use [[Stylix]]<ref>https://github.com/nix-community/stylix</ref> to theme Kitty by enabling its built-in integration:<ref>https://nix-community.github.io/stylix/options/modules/kitty.html#stylixtargetskittyenable</ref>
</translate>
<syntaxhighlight lang="nix">
stylix.targets.kitty.enable = true;
stylix.targets.kitty.enable = true;
</syntaxhighlight>
</syntaxhighlight>
== Troubleshooting ==
<translate>
<!--T:10-->
{{Expansion|reason=Section incomplete, needs detailed troubleshooting steps}}
</translate>


== References ==
== References ==


# https://github.com/kovidgoyal/kitty
<references/>
# https://sw.kovidgoyal.net/kitty/
 
# https://nix-community.github.io/home-manager/options.xhtml#opt-programs.kitty.enable
# https://stylix.danth.me/options/hm.html#stylixtargetskittyenable
[[Category:Applications]]
[[Category:Applications]]
[[Category:Terminal]]
[[Category:Terminal]]

Latest revision as of 10:31, 19 July 2025

Kitty is a modern, fast, GPU-based terminal emulator written in Python and C. It leverages graphics hardware for high performance and offers features like tabs, layouts, and GPU-based rendering. Kitty is available in the NixOS ecosystem and can be configured through various methods.[1]

Installation

Shell

To temporarily use Kitty in a shell environment, you can run:

nix-shell -p kitty

This will provide a shell with Kitty available without adding it to your system configuration.

System setup

To install Kitty, add it to either the system-wide environment.systemPackages in /etc/nixos/configuration.nix or to the user-specific home.packages in ~/.config/nixpkgs/home.nix.[2]

# System-wide installation (in /etc/nixos/configuration.nix)
environment.systemPackages = with pkgs; [
  kitty
];

# User-specific installation (in ~/.config/nixpkgs/home.nix)
home.packages = with pkgs; [
  kitty
];

Then, rebuild your system or apply your Home Manager configuration:

# For system-wide installation
sudo nixos-rebuild switch

# For Home Manager
home-manager switch

Configuration

Basic

NixOS does not include a native module for Kitty. For basic Kitty configuration on NixOS, you need to manually follow the steps from Kitty's documentation.[3]

If you're using Home Manager, you can enable Kitty with a simple configuration:

programs.kitty.enable = true;

Advanced

For more advanced Home Manager configuration, you can specify various Kitty settings:

programs.kitty = lib.mkForce {
  enable = true;
  settings = {
    confirm_os_window_close = 0;
    dynamic_background_opacity = true;
    enable_audio_bell = false;
    mouse_hide_wait = "-1.0";
    window_padding_width = 10;
    background_opacity = "0.5";
    background_blur = 5;
    symbol_map = let
      mappings = [
        "U+23FB-U+23FE"
        "U+2B58"
        "U+E200-U+E2A9"
        "U+E0A0-U+E0A3"
        "U+E0B0-U+E0BF"
        "U+E0C0-U+E0C8"
        "U+E0CC-U+E0CF"
        "U+E0D0-U+E0D2"
        "U+E0D4"
        "U+E700-U+E7C5"
        "U+F000-U+F2E0"
        "U+2665"
        "U+26A1"
        "U+F400-U+F4A8"
        "U+F67C"
        "U+E000-U+E00A"
        "U+F300-U+F313"
        "U+E5FA-U+E62B"
      ];
    in
      (builtins.concatStringsSep "," mappings) + " Symbols Nerd Font";
  };
};

Tips and tricks

Theming with Stylix

You can use Stylix[4] to theme Kitty by enabling its built-in integration:[5]

stylix.targets.kitty.enable = true;

Troubleshooting

☶︎
This article or section needs to be expanded. Section incomplete, needs detailed troubleshooting steps Further information may be found in the related discussion page. Please consult the pedia article metapage for guidelines on contributing.

References