Commit Graph

16959 Commits

Author SHA1 Message Date
Kovid Goyal
7c13c04c84 Move color parsing code to C for performance 2025-12-30 21:43:57 +05:30
Kovid Goyal
a4d88beddb Micro-optimisation 2025-12-30 13:40:49 +05:30
Kovid Goyal
2aed1c9c06 Remove unused code 2025-12-30 13:34:24 +05:30
Kovid Goyal
877d143c1a Make mypy happy 2025-12-30 13:32:04 +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
abd1ad551b Merge branch 'dependabot/go_modules/all-go-deps-37ed0ecc19' of https://github.com/kovidgoyal/kitty 2025-12-29 08:49:02 +05:30
dependabot[bot]
b47e099726 Bump github.com/alecthomas/chroma/v2 in the all-go-deps group
Bumps the all-go-deps group with 1 update: [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma).


Updates `github.com/alecthomas/chroma/v2` from 2.20.0 to 2.21.1
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.20.0...v2.21.1)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.21.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 03:05:36 +00:00
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
Kovid Goyal
64207dc05c Ensure tab bar visibility is updated when removing a tab 2025-12-28 09:36:49 +05:30
Kovid Goyal
25d8d9fe69 Bump max font size to 10*configured from 5*configured 2025-12-28 08:46:55 +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
Kovid Goyal
cc55c04034 Support XTGETTCAP query with key query-os[-_]name
Fixes #9217
2025-12-25 18:22:42 +05:30
Kovid Goyal
0fb54d32b1 Fix #9323 2025-12-24 16:35:10 +05:30
Kovid Goyal
0fd3a18121 ... 2025-12-24 12:15:16 +05:30
Kovid Goyal
c26b770530 version 0.45.0 v0.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
Kovid Goyal
c00e41ecee Merge branch 'dependabot/github_actions/actions-97f38a5d32' of https://github.com/kovidgoyal/kitty 2025-12-22 09:06:06 +05:30
dependabot[bot]
232edb3ad3 Bump actions/cache from 4 to 5 in the actions group
Bumps the actions group with 1 update: [actions/cache](https://github.com/actions/cache).


Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 03:22:12 +00:00
Kovid Goyal
915a878a0a Merge branch 'update-wayland-compat-matrix' of https://github.com/alex-huff/kitty 2025-12-22 08:43:50 +05:30
Kovid Goyal
291c08758f Merge branch 'dependabot/go_modules/all-go-deps-4b4744f558' of https://github.com/kovidgoyal/kitty 2025-12-22 08:43:20 +05:30
dependabot[bot]
9bd447d4e7 Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [golang.org/x/image](https://github.com/golang/image) and [golang.org/x/text](https://github.com/golang/text).


Updates `golang.org/x/image` from 0.33.0 to 0.34.0
- [Commits](https://github.com/golang/image/compare/v0.33.0...v0.34.0)

Updates `golang.org/x/text` from 0.31.0 to 0.32.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
- dependency-name: golang.org/x/text
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 03:03:37 +00:00
alex-huff
59cf17f2be docs: panel: update river compatibility information 2025-12-21 12:17:56 -06:00
Kovid Goyal
0ad032c0d2 Merge branch 'fix-9017' of https://github.com/flaviut/kitty 2025-12-21 08:18:33 +05:30
Flaviu Tamas
811cd5870b fix #9017 2025-12-20 18:31:30 -05: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
06e7f5ec37 Fix #9306 2025-12-20 08:54:22 +05:30
Kovid Goyal
fd9d49a438 Make mypy happy 2025-12-19 11:57:48 +05:30
Kovid Goyal
315fa53198 Add active tab history to @ ls output
Useful for tools wanting to list tabs in MRU order.
Fixes #9303
2025-12-19 11:46:12 +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
Kovid Goyal
99b1eca3c8 Disable NSAutoFillHeuristicController on spec 2025-12-18 10:16:59 +05:30
Kovid Goyal
8bf2f439c8 Merge branch 'nyan-icon' of https://github.com/mtklr/kitty 2025-12-18 08:22:47 +05:30
Matt K
0a0a575a57 add nyancat app icon 2025-12-17 17:10:34 -05:00
Kovid Goyal
562b4ee9ed More docs 2025-12-16 19:46:44 +05:30
Kovid Goyal
5b5ba91aa9 Merge branch 'dependabot/go_modules/all-go-deps-85d9a9ac9a' of https://github.com/kovidgoyal/kitty 2025-12-15 09:02:58 +05:30
dependabot[bot]
75bff944ef Bump the all-go-deps group with 3 updates
Bumps the all-go-deps group with 3 updates: [github.com/klauspost/compress](https://github.com/klauspost/compress), [github.com/nwaples/rardecode/v2](https://github.com/nwaples/rardecode) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `github.com/klauspost/compress` from 1.18.1 to 1.18.2
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](https://github.com/klauspost/compress/compare/v1.18.1...v1.18.2)

Updates `github.com/nwaples/rardecode/v2` from 2.2.1 to 2.2.2
- [Commits](https://github.com/nwaples/rardecode/compare/v2.2.1...v2.2.2)

Updates `golang.org/x/sys` from 0.38.0 to 0.39.0
- [Commits](https://github.com/golang/sys/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/nwaples/rardecode/v2
  dependency-version: 2.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: golang.org/x/sys
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 03:03:38 +00: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
Kovid Goyal
8fc5ab235e Merge branch 'fix-typos' of https://github.com/shfc/kitty 2025-12-14 18:10:59 +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
f39183bd6b Ignore inapplicable CVE 2025-12-11 12:49:16 +05:30
Kovid Goyal
0837fd548d Update changelog 2025-12-11 11:21:43 +05:30