Commit graph

70 commits

Author SHA1 Message Date
Kovid Goyal
62ed852f97
Cleanup patch_global_colors special color decoding
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Check for conversion errors per option so a failed conversion returns
immediately instead of storing the error sentinel and continuing. Document
why macos_titlebar_color stays signed. Make the test meaningful on 64-bit
platforms by asserting negative values are rejected for the unsigned
options, and restore options afterwards.
2026-11-09 19:03:53 +05:30
Zhizhen He
153a8c6295 Fix special color decoding on 32-bit platforms
RGB encodings can use the high bit of a 32-bit long. Decode the Wayland titlebar and scrollbar colors as unsigned values at runtime, matching their config converters. Keep the signed macOS titlebar sentinels.
2026-11-09 21:16:34 +08:00
Kovid Goyal
b62e21311d
hyperlink_target_position: Add a tooltip value
Displays the URL in a box sized to fit it, just below the hovered cell,
like a web browser tooltip. Split render_a_bar() into rendering the text
and drawing it so the width of the rendered text can be used to position
the box.

Also redraw when the hovered cell within a hyperlink changes, as the
position of the displayed target now depends on it.
2026-10-29 19:24:32 +05:30
Kovid Goyal
94938d53ee
Add a hyperlink_target_position option
Controls where the URL shown by show_hyperlink_targets is displayed:
along the top or bottom edge of the window, or immediately below the
hovered line. In all cases the URL is moved to the opposite side if it
would otherwise obscure the hovered line.

Fixes #10770
2026-10-29 19:18:07 +05:30
Kovid Goyal
8e99fba8ec
Fix #10668
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
2026-10-16 07:35:45 +05:30
Kovid Goyal
e0382c0138
mouse_map: Allow mapping horizontal scrolling with wheel_left and wheel_right
Both axes of a scroll event are dispatched, so a diagonal gesture can fire
both, and the event is consumed if either axis is mapped. An unmapped event
continues a mapped gesture only if it scrolls along axes without any mappings.
2026-10-12 11:25:25 +05:30
Kovid Goyal
0ae80efa10
Merge PR #10590: Allow mapping the scroll wheel with mouse_map
# Conflicts:
#	docs/changelog.rst
2026-10-12 11:00:08 +05:30
rudolf-blue
1adf1fbb76 Use a per instance cache for resolved action aliases 2026-10-09 00:01:01 -04:00
Steve
f4a773e47a
Allow mapping the scroll wheel with mouse_map. Add wheel_up/wheel_down pseudo buttons, fired once per wheel step, so e.g. ctrl+wheel can change font size. 2026-10-02 14:44:48 +02:00
Hassan Raza
666a7190d4
Use parsed command boundary for session expansion 2026-09-27 11:43:56 +05:00
Hassan Raza
2c1262f76c
Preserve transparency across launch color overrides 2026-09-27 10:59:19 +05:00
rudolf-blue
18bddffcca Raise the maximum font size and fix the legacy zoom limit
The ceiling in change_font_size is ten times the configured font_size, so
the largest size you can reach depends on the size you configured. With
font_size 6 zooming stops at 60pt, while font_size 20 reaches 200pt. That
is backwards: a small configured font is if anything a reason to want a
larger temporary zoom, not a smaller one.

Use the larger of that multiple and an absolute 256pt. No existing setup
loses range, since the multiple still wins whenever it is the bigger of
the two. The bounds and the clamp move into options/utils.py so the
numbers are in one place and can be tested directly.

increase_font_size also had its own cap of five times font_size. That was
the old limit, missed when 25d8d9fe6 raised change_font_size to ten, and
because the wrapper clamps before delegating, the stale bound is the one
that wins. Both legacy wrappers can simply drop their bounds: they go
through change_font_size, which already clamps.
2026-09-07 19:41:08 -04:00
NightWatcher
376e72ded8 Add configurable rounded window borders 2026-08-29 22:30:04 +08:00
Hassan Raza
bf7d908e3f
Parse goto_session options when discovering sessions 2026-08-28 16:21:17 +05:00
Kovid Goyal
58828dd893
Simplify remap_modifier making it a single option 2026-08-11 18:32:21 +05:30
Kovid Goyal
36872d91bb
autoformat 2026-08-11 16:49:43 +05:30
Kovid Goyal
50c683e1a7
Merge PR #10307: Add remap_modifier option
Adds remap_modifier config option to present one modifier key to kitty
as another, as discussed in issue #1077. Resolves merge conflicts by
adopting master's formatting style (multi-line macros, pointer spacing)
while preserving all new PR functionality.

Co-Authored-By: Bjoern <bjohas@users.noreply.github.com>
2026-08-11 16:42:53 +05:30
bjohas
07be70cf86 Add tests for remap_modifier
Covers the empty default, a single remap, that both directions of a swap are
recorded, that the last declaration for a source wins wherever it appears,
multi-modifier destinations, and that every rejection is reported rather than
silently ignored: wrong arity, unknown or non-remappable modifier names, a
source naming more than one modifier, and a no-op mapping.

Whether the permutation is applied simultaneously rather than sequentially is
a property of the C code and is not observable from the parsed dict, which is
identical either way; the comment says so rather than implying more coverage
than exists.
2026-08-06 16:22:37 +01:00
Kovid Goyal
7f0b072f0d
autoformat 2026-08-05 05:32:56 +05:30
copilot-swe-agent[bot]
a31f9e52f2
Refactor kitty_tests: move __init__.py code to base.py, update all imports 2026-08-05 05:32:54 +05:30
Bruno Volpato
8d935486ef tabbar: address vertical alignment feedback 2026-04-25 15:21:50 -04:00
bvolpato
19ea73f047 Add vertical tab bars on the left and right
Teach tab_bar_edge about left and right sidebars and route tab layout,
hit-testing, and drag/drop through the vertical axis when needed.
2026-04-25 15:08:15 -04:00
Kovid Goyal
896d193413
pep8 2026-04-24 10:42:25 +05:30
copilot-swe-agent[bot]
7d3ff332b9
macOS: fix args passed via open --args being ignored when macos-launch-services-cmdline is present (fixes #9910)
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/2cdc7e8f-5b64-4c97-bd65-dec508155313

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-24 04:52:37 +00:00
zhaolei
40c2012eeb Support negative inactive_text_alpha values for active-window-only fading 2026-04-09 13:04:01 +08:00
Alexis (Poliorcetics) Bourget
4cccf929eb
fix: when parsing python_strings options, don't fail if ' is last
Previously, if the last character was `'` parsing would fail: from `abc'`
it would produce the literal `'''abc''''`, which has one too many
unescaped single quote at the end.

This also fixes the issue for solo `'''`, where before it would produce
`''''\\'''''`, again with one too many single quote at the end.

I added tests for both cases.
2025-09-06 20:33:15 +02:00
Kovid Goyal
8d213bba04
Make test more robust against env 2025-04-30 05:50:05 +05:30
Kovid Goyal
b9326f5c94
Add some formatting to CLIParser error messages 2025-04-29 07:26:48 +05:30
Kovid Goyal
909b8747d3
Add launcher test for list style options 2025-04-28 13:55:36 +05:30
Kovid Goyal
14792aa60e
Allow partial option matches in C CLI parser as well
Matches behavior of Go parser and is nice to have
2025-04-28 12:43:09 +05:30
Kovid Goyal
5c9c8aa424
Add unit testing for launcher code 2025-04-28 09:25:25 +05:30
Kovid Goyal
b0ae88ada9
Wire up the codegen C cli parser 2025-04-28 09:20:11 +05:30
Kovid Goyal
1413d8fb85
Fix handling of --help and --version 2025-04-28 09:20:11 +05:30
Kovid Goyal
27c5b6aac5
Generate option parser in C for kitty CLI 2025-04-28 09:20:10 +05:30
Kovid Goyal
62699f6799
Get basic C cli parsing working 2025-04-28 09:20:10 +05:30
Kovid Goyal
3f00dc1c9e
Work on improving CLI parsing
Can now set bool values explicitly with =
Handle multi short flag args like -abc
Add unit tests for CLI parsing
Generate go code to serialize CLI options as a cmdline

TODO: Implement setting of bool vals in C and Go parsing code
TODO: Help/rst output should somehow indicate this feature
2025-04-26 09:01:54 +05:30
Your Name
33167f2057 Change mouse_hide_wait to struct, and change mouse_show_* options to optional parameters for struct. mouse_show_* renamed to mouse_unhide_* 2025-04-04 11:22:56 +00:00
Your Name
464446e388 Prevent mouse cursor from showing on short, unintentional flicks 2025-04-04 04:33:47 +00:00
Kovid Goyal
1eeea70c7a
Allow dynamically generating configuration by running an arbitrary program using the new geninclude directive 2025-01-06 19:00:01 +05:30
Kovid Goyal
909bccb807
When mapping a custom kitten allow using shell escaping for the kitten path
Fixes #8178
2024-12-31 12:13:17 +05:30
Kovid Goyal
21e19a90f4
Add test for multiple function handling 2024-07-18 22:25:02 +05:30
Kovid Goyal
9c75ea795d
Recognize more linear bezier curves 2024-07-18 22:25:02 +05:30
Kovid Goyal
39dfa75fe7
Add test for steps easing function value calculation 2024-07-18 22:25:02 +05:30
Kovid Goyal
e927f8da62
Add some tests for easing function parsing 2024-07-18 22:25:02 +05:30
Kovid Goyal
165f1ccfd1
Port the test 2023-11-30 20:06:20 +05:30
Kovid Goyal
716bf714db
Fix a couple of tests 2023-11-30 11:53:09 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Jake Stewart
6354ef4cee add tests for python config parser 2023-09-03 16:37:59 +08:00
Kovid Goyal
7fe5d7b58f
Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
1aa50b73a1
Allow pixel based adjustments as well 2022-07-15 11:45:43 +05:30