If you live in the terminal, kitty is made for you! Cross-platform, fast, feature-rich, GPU based. https://sw.kovidgoyal.net/kitty/
Find a file
Johannes Altmanninger 9ab0c8575e Fix Python.h being included after system headers
My "./dev.sh build" failed with

    Compiling kitty/screen.c ...
    gcc -MMD -DNDEBUG -DPRIMARY_VERSION=4000 -DSECONDARY_VERSION=37 -DXT_VERSION="0.37.0" -I/home/johannes/git/kitty/dependencies/linux-amd64/include -Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11 -pedantic-errors -Werror -O3 -fwrapv -fstack-protector-strong -pipe -fvisibility=hidden -fno-plt -fPIC -D_FORTIFY_SOURCE=2 -flto -fcf-protection=full -march=native -mtune=native -pthread -I/home/johannes/git/kitty/dependencies/linux-amd64/include/libpng16 -I/home/johannes/git/kitty/dependencies/linux-amd64/include -I/home/johannes/git/kitty/dependencies/linux-amd64/include -I/home/johannes/git/kitty/dependencies/linux-amd64/include -I/home/johannes/git/kitty/dependencies/linux-amd64/include/freetype2 -I/home/johannes/git/kitty/dependencies/linux-amd64/include/libpng16 -I/usr/include/uuid -I/home/johannes/git/kitty/dependencies/linux-amd64/include/harfbuzz -I/home/johannes/git/kitty/dependencies/linux-amd64/include/freetype2 -I/home/johannes/git/kitty/dependencies/linux-amd64/include/libpng16 -I/home/johannes/git/kitty/dependencies/linux-amd64/include -I/home/johannes/git/kitty/dependencies/linux-amd64/include/python3.12 -c kitty/screen.c -o build/fast_data_types-kitty-screen.c.o
    In file included from /home/johannes/git/kitty/dependencies/linux-amd64/include/python3.12/Python.h:12,
                     from kitty/data-types.h:11,
                     from kitty/text-cache.h:10,
                     from kitty/line.h:10,
                     from kitty/history.h:10,
                     from kitty/lineops.h:9,
                     from kitty/fonts.h:9,
                     from kitty/screen.c:19:
    /home/johannes/git/kitty/dependencies/linux-amd64/include/python3.12/pyconfig.h:1875:9: error: "_POSIX_C_SOURCE" redefined
     1875 | #define _POSIX_C_SOURCE 200809L
          |         ^~~~~~~~~~~~~~~
    In file included from /usr/include/bits/libc-header-start.h:33,
                     from /usr/include/stdint.h:26,
                     from /usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/include/stdint.h:9,
                     from kitty/charsets.h:9,
                     from kitty/screen.c:17:
    /usr/include/features.h:329:10: note: this is the location of the previous definition
      329 | # define _POSIX_C_SOURCE 199506L
          |          ^~~~~~~~~~~~~~~
    The following build command failed: /home/johannes/git/kitty/dependencies/linux-amd64/bin/python setup.py develop
    exit status 1

[Python docs](https://docs.python.org/3/c-api/intro.html) say:

> Since Python may define some pre-processor definitions which affect
> the standard headers on some systems, you must include Python.h
> before any standard headers are included.

Make it so. Since data-types.h is already included first in a lot of
*.c and *.h files, let's use that one.
Also fix the includes in launcher.

This is similar to commit 8e84b2145 (Re-order includes for
"_POSIX_C_SOURCE", 2018-06-02).

Also add an explicit error for this case, to make the resolution more
obvious? Here's the error when I try to include <stdlib.h> in screen.c:

    In file included from kitty/screen.c:14:
    kitty/data-types.h:11:2: error: #error "Must include \"data-types.h\" before any system headers"
       11 | #error "Must include \"data-types.h\" before any system headers"
          |  ^~~~~
    In file included from /home/johannes/git/kitty/dependencies/linux-amd64/include/python3.12/Python.h:12,
                     from kitty/data-types.h:14:
    /home/johannes/git/kitty/dependencies/linux-amd64/include/python3.12/pyconfig.h:1875:9: error: "_POSIX_C_SOURCE" redefined
     1875 | #define _POSIX_C_SOURCE 200809L
          |         ^~~~~~~~~~~~~~~
    In file included from /usr/include/bits/libc-header-start.h:33,
                     from /usr/include/stdlib.h:26,
                     from kitty/screen.c:13:
    /usr/include/features.h:329:10: note: this is the location of the previous definition
      329 | # define _POSIX_C_SOURCE 199506L
          |          ^~~~~~~~~~~~~~~
    The following build command failed: /home/johannes/git/kitty/dependencies/linux-amd64/bin/python setup.py develop
    exit status 1
2024-11-24 16:52:49 +01:00
.github Add a test for ./dev.sh to CI 2024-09-29 21:44:35 +05:30
3rdparty ... 2024-07-14 12:34:24 +05:30
bypy Bump Go to 1.23 2024-08-24 08:06:02 +05:30
docs Graphics protocol: Fix delete by number not deleting newest image with the specified number 2024-11-24 10:11:34 +05:30
gen Get automatic theme switching working 2024-11-07 17:31:44 +05:30
glad Make shebangs consistent 2023-11-11 08:32:05 +05:30
glfw Wayland GNOME: Workaround bug in mutter causing double tap on titlebar to not always work 2024-11-18 08:46:17 +05:30
kittens clipboard kitten: Fix a bug causing kitten to hang in filter mode when input data size is not divisible by 3 and larger than 8KB 2024-11-19 11:24:59 +05:30
kitty Fix Python.h being included after system headers 2024-11-24 16:52:49 +01:00
kitty_tests Graphics protocol: Fix delete by number not deleting newest image with the specified number 2024-11-24 10:11:34 +05:30
logo Oxipng/svgo images to save some 150KB~ 2024-03-25 23:42:56 +01:00
shell-integration Fix #7724 2024-08-16 18:50:40 +05:30
terminfo Fix #7321 2024-04-08 07:39:50 +05:30
tools ... 2024-11-23 12:06:39 +05:30
.editorconfig Note that we use tabs for indent in *.go files in editorconfig 2023-02-25 08:33:51 +05:30
.gitattributes make clean should clean generated asm as well 2024-02-25 09:57:40 +05:30
.gitignore Use builtin NERD fonts 2024-07-02 10:28:07 +05:30
.ignore
__main__.py Make shebangs consistent 2023-11-11 08:32:05 +05:30
benchmark.py Code to run the benchmark kitten headlessly 2024-11-04 09:10:08 +05:30
Brewfile See if dropping pkgconf fixes CI build 2024-11-23 19:48:05 +05:30
build-terminfo Make the terminfo database available in the compiled module 2024-03-21 10:16:50 +05:30
CHANGELOG.rst
CONTRIBUTING.md Fix misspellings 2023-06-14 03:39:53 +06:00
count-lines-of-code Move base64simd into a 3rdparty folder 2024-02-25 09:57:29 +05:30
dev.sh Update docs for new develop builds 2023-07-29 14:16:25 +05:30
go.mod Bump the all-go-deps group with 2 updates 2024-11-11 03:12:28 +00:00
go.sum Bump the all-go-deps group with 2 updates 2024-11-11 03:12:28 +00:00
INSTALL.md
key_encoding.json
LICENSE
Makefile Update docs for new develop builds 2023-07-29 14:16:25 +05:30
publish.py Cleanup builder invocation now that linux builders are chroot based 2024-09-06 09:36:51 +05:30
pyproject.toml Bump minimum python version to 3.9 2024-07-27 00:07:17 +05:30
README.asciidoc Update repology links 2024-10-01 15:31:16 +05:30
SECURITY.md
session.vim Switch to LSP for mypy 2024-03-28 19:36:07 +05:30
setup.py Bump Go to 1.23 2024-08-24 08:06:02 +05:30
shell.nix nix: Drop python3Packages.xxhash from build inputs 2024-10-03 22:43:55 -04:00
staticcheck.conf configure staticcheck 2022-11-14 15:42:01 +05:30
test.py Dont change the env for go tests 2022-11-14 15:41:53 +05:30
update-on-ox Allow turning off stripping in update-on-ox 2024-08-18 15:30:38 +05:30

= kitty - the fast, feature-rich, cross-platform, GPU based terminal

See https://sw.kovidgoyal.net/kitty/[the kitty website].

image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"]

https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions]

To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the
https://www.reddit.com/r/KittyTerminal[Reddit community]

Packaging status in various repositories:

image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]