Commit graph

3262 commits

Author SHA1 Message Date
Kovid Goyal
a53d5b2fae
Update changelog
Fixes #3732
2026-01-20 17:26:31 +05:30
Kovid Goyal
9ef934cf54
Wayland: Remove usage of the Wayland color management protocol to inform compositors of the color space used by kitty
As is typical with Wayland, the protocol is poorly designed and
implemented even worse. Hyprland 0.53 has completely broken color
management.
https://github.com/hyprwm/Hyprland/discussions/12788
In addition it and mangowc crash when using color management with nouveau drivers.
https://github.com/kovidgoyal/kitty/issues/9030

KDE kwin does not support the sRGB transfer function. And the geniuses
at Wayland are any way planning to deprecate sRGB as a transfer function.

Only GNOME mutter seems to get it right.

Then there are people that are likely going to shoehorn this into EGL
instead of leaving it under application control via the protocol anyway.
https://github.com/KhronosGroup/EGL-Registry/issues/197

Sigh. Wayland.
2026-01-15 09:53:09 +05:30
Kovid Goyal
d35c786358
Bump imaging to fix #9376 2026-01-15 09:13:02 +05:30
Kovid Goyal
c389f4d5b8
Wayland: Fix doubled key repeat events when compositor sends repeat events
Fixes #9374
2026-01-15 08:13:37 +05:30
Kovid Goyal
edd466e5f7
Pygments does not need type checking globally ignored anymore 2026-01-14 22:18:11 +05:30
Kovid Goyal
0cca5d1a10
Only update tab bar visibility after all tabs have been added from a session
Fixes #9382
2026-01-14 21:11:07 +05:30
Kovid Goyal
21da5350d3
Update changelog 2026-01-09 17:22:26 +05:30
Kovid Goyal
2ab0fcb373
Make Wayland momentum scrolling configurable 2026-01-09 13:46:49 +05:30
Kovid Goyal
3637e31ca3
Fix goto_session not respecting the focus_tab session directive when creating a session in an existing OS window
Fixes #9366
2026-01-08 20:43:38 +05:30
Kovid Goyal
d6cb5c367e
Remove warning about multiple cursors protocol being under discussion
It is no longer under discussion
2026-01-08 14:51:05 +05:30
Kovid Goyal
da45f7eeaa
Clenaup previous PR
Make pixel scrolling the default. Fix memory leak where blank line was
not being deallocated in Screen destructor.
2026-01-08 11:01:34 +05:30
Kovid Goyal
0168d19e57
Merge branch 'feat/scroll-per-pixel' of https://github.com/idelice/kitty 2026-01-08 09:12:34 +05:30
Kovid Goyal
df17142ea4
Fix #9355 2026-01-06 08:37:24 +05:30
Kovid Goyal
e1199bcee2
Initial implementation of momentum for finger based scrolling on Wayland
Needs configuration and possibly the parameter adjustment once pixel
scrolling is merged.
2026-01-05 19:52:44 +05:30
Kovid Goyal
e11e1ba929
... 2026-01-03 00:35:12 +05:30
Kovid Goyal
388388381d
ncurses is even worse than I thought it was 2026-01-03 00:32:43 +05:30
Kovid Goyal
ba389d68b9
macOS: Fix changes to macos_titlebar_color while in full screen not being applied after exiting fullscreen
Fixes #9350
2026-01-03 00:19:03 +05:30
Kovid Goyal
5375ca671c
Update changelog 2026-01-01 23:12:38 +05:30
Kovid Goyal
573bfb688a
Move parsing of colors fully into C
Uses a perfect hash function for color name lookup
2025-12-31 14:21:45 +05:30
Kovid Goyal
4773ac81b6
Fix warning from sphinx 2025-12-30 13:23:46 +05:30
Kovid Goyal
62d5fcc074
Merge branch 'wide-gamut-colors' of https://github.com/jokull/kitty 2025-12-30 13:19:44 +05:30
Kovid Goyal
74c67d2253
... 2025-12-29 12:12:27 +05:30
Kovid Goyal
95c1f5aca5
Ensure tabs bar visibility is updated when switching active tab as well
Visibility can change if tab_bar_filter is used and active tab is
changed. See #9328
2025-12-28 10:01:50 +05:30
Jökull Sólberg
64abd87a9e Add wide gamut color support with OKLCH and LAB formats
Implements modern wide gamut color formats with CSS Color Module Level 4
gamut mapping, addressing PR feedback with Go implementation, performance
benchmarks, and reorganized documentation.

Features:
- OKLCH (perceptually uniform color space)
- CIE LAB (device-independent color space)
- CSS Color 4 compliant gamut mapping algorithm
- Inline comment support in color config parsing

Addressing PR Feedback:

1. Go Implementation (tools/utils/style/):
   - Complete OKLCH and LAB parsing with gamut mapping
   - Matches Python implementation structure
   - Comprehensive test suite (all tests passing)
   - Performance benchmarks showing acceptable overhead

2. Performance Benchmarks:
   - OKLCH: ~4.6 µs/op
   - LAB: ~1.5 µs/op
   - 10 mixed colors: ~13 µs total
   - Typical config (50 colors): <0.5ms startup impact

3. Documentation Reorganization:
   - Moved detailed color docs to docs/wide-gamut-colors.rst
   - Configuration docs now link to separate documentation
   - Reduces size of main configuration documentation

Gamut Mapping:
- Binary search chroma reduction from CSS Color Module Level 4
- Preserves lightness and hue while reducing chroma for out-of-gamut colors
- Uses deltaE OK (JND threshold: 0.02) for perceptual difference
- Ensures graceful degradation on sRGB displays

Python Implementation:
- parse_oklch(): OKLCH color parsing with gamut mapping
- parse_lab(): CIE LAB parsing with gamut mapping via OKLCH conversion
- lab_to_oklch(): LAB to OKLCH conversion for consistent gamut mapping
- oklch_to_srgb_gamut_map(): CSS Color 4 gamut mapping algorithm
- srgb_to_oklab(): Reverse conversion for deltaE calculations
- deltaE_ok(): Perceptual color difference in OKLab space

Go Implementation:
- colorspaces.go: All color space conversions and gamut mapping
- wrapper.go: ParseColor() updated to support OKLCH and LAB
- Comprehensive test coverage with benchmarks
- Matches Python implementation behavior

Robustness:
- NaN and infinity validation in all color parsing functions
- Defense-in-depth with validation at parsing and gamut mapping levels
- Returns None/error for invalid input (consistent error handling)
- Validates before clamping operations to prevent NaN propagation

Files changed:
- Python: kitty/rgb.py, kitty_tests/datatypes.py (+250 lines)
- Go: tools/utils/style/colorspaces.go, wrapper.go (+350 lines, tests)
- Docs: docs/wide-gamut-colors.rst (moved from inline)
- Config: kitty/options/definition.py (simplified, links to docs)

References:
- CSS Color Module Level 4: https://www.w3.org/TR/css-color-4/
- OKLCH Color Space: https://bottosson.github.io/posts/oklab/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 14:34:34 +00:00
Delice0
63fcebd285 Clarify pixel_scroll scrollback scope 2025-12-26 19:33:21 +01:00
Delice0
5f45abd311 Document pixel scrolling option 2025-12-26 19:33:21 +01:00
Kovid Goyal
0fd3a18121
... 2025-12-24 12:15:16 +05:30
Kovid Goyal
c26b770530
version 0.45.0 2025-12-24 09:24:17 +05:30
Kovid Goyal
ef4e6f97bc
... 2025-12-24 09:19:52 +05:30
Kovid Goyal
df32684afd
Update choose files docs 2025-12-24 09:17:24 +05:30
Kovid Goyal
44efa30679
... 2025-12-23 15:50:55 +05:30
Kovid Goyal
eb43aacb02
Update changelog 2025-12-23 12:25:48 +05:30
alex-huff
59cf17f2be docs: panel: update river compatibility information 2025-12-21 12:17:56 -06:00
Kovid Goyal
e368ce0d52
Fix docs build breakage 2025-12-20 09:13:02 +05:30
Kovid Goyal
5b0b714baa
Update changelog 2025-12-20 09:10:39 +05:30
Kovid Goyal
b9e75ac301
Add matplotlib as a requirement for docs 2025-12-20 09:07:19 +05:30
Kovid Goyal
4f73374a12
YATB: Yet Another Tahoe Bug from the company that should stick to selling fruit
Fixes #9299
2025-12-18 11:13:38 +05:30
Matt K
0a0a575a57 add nyancat app icon 2025-12-17 17:10:34 -05:00
Kovid Goyal
322904b339
Update changelog 2025-12-14 20:07:52 +05:30
Kovid Goyal
0ecee7dcca
macOS: Workaround for regression in Tahoe 26.2 that breaks --detach
Fixes #9288
2025-12-14 19:42:57 +05:30
shfc
51a08d23cd
fix: typos in documentation 2025-12-14 22:42:24 +10:30
Kovid Goyal
399354cbe5
Fix tab_bar_min_tabs not tab_bar_filter
Fixes #9278
2025-12-12 17:11:43 +05:30
Kovid Goyal
94106aa79e
Add dawn to the list of integrations 2025-12-12 00:41:41 +05:30
Kovid Goyal
0837fd548d
Update changelog 2025-12-11 11:21:43 +05:30
Filip Czaplicki
34776469e0
Optimize quake webp screenshots
I noticed that screenshots load slowly at
https://sw.kovidgoyal.net/kitty/kittens/panel/

I used https://squoosh.app/ with webp default settings
2025-12-07 17:32:33 +01:00
Kovid Goyal
270d3ed656
Note that iTerm2 also added support for the kitty graphics protocol 2025-12-04 22:32:52 +05:30
Kovid Goyal
8e15e14538
When moving windows to a new tab/OS Window fix overlay windows not being grouped with their parent windows
Fixes #9266
2025-12-04 07:49:48 +05:30
Kovid Goyal
16008b950a
Wayland: Fix spurious key repeat events when some user defined callback takes a long time to execute
On compositors that support compositor key repeat events, use those, for
complete robustness. Sadly no actual compositor implements these yet.

Otherwise use a timer fd/pipe to queue the repeat events and only
dispatch them after events from the compositor are handled. This means
release events from the compositor will prevent spurious repeat events.
One can, in the worst case lose some repeat events if there is a very
large interval between the start of the timer and the next poll, but
that is unavoidable and is why repeat events should come from the compositor
in the first place.

Fixes #9224
2025-12-03 22:26:09 +05:30
Kovid Goyal
7d24c82d4d
Update FAQ to defer to OSC 21 spec for setting colors via escape codes 2025-12-03 20:29:00 +05:30
Kovid Goyal
ff72c79628
Edit docs for typos 2025-12-02 06:26:47 +05:30