Commit graph

19203 commits

Author SHA1 Message Date
Kovid Goyal
c6184e2b41
A ripple-on-click shader 2026-08-08 11:55:37 +05:30
Kovid Goyal
73bfa1332e
Add a couple more cursor trail custom shaders
These are the blaze and lightning styles.
2026-08-08 11:35:57 +05:30
Kovid Goyal
753daa1a71
Make cursor trail color setting available as a uniform 2026-08-08 05:15:44 +05:30
Kovid Goyal
92b413ea5b
Allow using custom shaders for cursor trail 2026-08-08 04:46:47 +05:30
Kovid Goyal
17e577f75b
Add a test to check that all custom shaders build 2026-08-07 18:49:56 +05:30
Kovid Goyal
6b21e7c067
disable spotlight when mouse leaves OS Window 2026-08-07 17:21:39 +05:30
Kovid Goyal
af0c6b9efb
micro optimisation 2026-08-07 17:16:18 +05:30
Kovid Goyal
795cc90d78
Auto hide spotlight when mouse pointer is hidden 2026-08-07 17:11:45 +05:30
Kovid Goyal
bd4165be60
More custom shaders 2026-08-07 16:41:41 +05:30
Kovid Goyal
192c1042da
Fireworks custom shaders 2026-08-07 16:26:31 +05:30
Kovid Goyal
19e386e9fd
Make constants all caps 2026-08-07 16:08:44 +05:30
Kovid Goyal
0bad7464cb
... 2026-08-07 15:59:56 +05:30
Kovid Goyal
b55e539dc3
Add spotlight custom shader 2026-08-07 15:56:04 +05:30
Kovid Goyal
b80acf8fe9
Add mouse control to shader 2026-08-07 15:37:53 +05:30
Kovid Goyal
faf56836d7
... 2026-08-07 15:06:56 +05:30
Kovid Goyal
0e964d2c5a
Make mouse position available as a uniform 2026-08-07 15:04:34 +05:30
Kovid Goyal
d773dcc81b
prevent user activity from restarting stopped shader when both are present in animation conditions 2026-08-07 12:14:22 +05:30
Kovid Goyal
d0ebd8d6ea
Nicer shader anim events logging 2026-08-07 12:03:22 +05:30
Kovid Goyal
b250667df5
Avoid traceback during shutdown 2026-08-07 12:02:00 +05:30
Kovid Goyal
2fb3bc13e4
Reduce debug rendering noise 2026-08-07 11:43:29 +05:30
Kovid Goyal
4e99889a4f
... 2026-08-07 11:40:14 +05:30
Kovid Goyal
563eb0d27b
stop matrix custom shader on user idle 2026-08-07 11:32:12 +05:30
Kovid Goyal
ba68f587e1
Add user activity events 2026-08-07 11:28:57 +05:30
Kovid Goyal
8cc31ee185
More joy for CodeQL 2026-08-07 10:47:01 +05:30
Kovid Goyal
5b32ba846f
... 2026-08-07 10:43:13 +05:30
Kovid Goyal
918b89bba7
Make CodeQL happy 2026-08-07 10:22:07 +05:30
Kovid Goyal
cccee2eb09
fix animation life cycle with os window focus in event 2026-08-07 10:15:18 +05:30
Kovid Goyal
a01a65b6bf
... 2026-08-07 10:00:53 +05:30
Kovid Goyal
8f02d80199
Initial port of inside the matrix custom shader 2026-08-07 09:51:16 +05:30
Kovid Goyal
a2efe2e072
... 2026-08-07 09:26:06 +05:30
Kovid Goyal
982d8f548e
add debug-rendering logging for custom shaders 2026-08-06 22:30:11 +05:30
Kovid Goyal
45b5b859d5
default animation duration is cursor_blink_interval 2026-08-06 22:20:11 +05:30
Kovid Goyal
88e18a985d
Dont calculate animation easing values multiple times for indentical easing curves 2026-08-06 21:37:46 +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
bjohas
9d678fa9f2 Add remap_modifier to present one modifier key to kitty as another
remap_modifier <from> <to>

Repeatable and off by default. The declarations compose as a single
simultaneous permutation applied once per event, so

    remap_modifier ctrl super
    remap_modifier super ctrl

exchanges the two rather than collapsing to the identity. Only shift, alt,
ctrl, super, hyper and meta may be named; anything else is rejected with an
error. The last declaration for a given source wins.

The remap is applied to the modifier mask BEFORE the platform produces the
keysym and text - in glfw_xkb_update_modifiers() before xkb_state_update_mask()
on Linux, and in remap_cocoa_flags() before UCKeyTranslate() and
interpretKeyEvents: on macOS. Applying it to the finished event instead
desynchronises the modifiers from the text for any modifier that participates
in text production: shift on Linux, and Option on macOS, which produces text
natively unless macos_option_as_alt is set.

Because the GLFW modifiers are themselves derived from that state, this is
application wide: kitty's own shortcuts, kitty_mod and the bytes sent to the
child all see the remapped modifier, and every mapping in kitty.conf is written
in terms of the modifier a key becomes. X11 pointer events do not go through
xkb, so translateState() - which only ever sees button and DND events - gets
the same treatment; Wayland pointer events already carry xkb-derived modifiers.

A modifier key's own event has its identity remapped too, so a program using
the full keyboard protocol does not see ctrl reported together with LEFT_HYPER.
The press/release state fixup on Linux is given the remapped modifier rather
than the physical one, so press and release agree.

--debug-input reports each remapped event.

Notes: on Wayland kitty only detects hyper and meta when
KITTY_WAYLAND_DETECT_MODIFIERS is set, so remapping to or from them has nothing
to act on there. On macOS hyper and meta have no Cocoa modifier flag, so a
remap onto them is left unapplied rather than silently dropping the modifier,
and interpretKeyEvents: is only approximately corrected because the event's
characters strings were computed by the OS from the physical flags; the
UCKeyTranslate() path, normally the one taken, is exact.

Generated option files and the glfw wrapper come from their generators.
2026-08-06 16:22:37 +01:00
Kovid Goyal
89dbb25b5f
Pass animation easing curve value to shaders in uniform 2026-08-06 20:18:31 +05:30
Kovid Goyal
2c8767b4e3
wire up custom shader animation events 2026-08-06 20:00:41 +05:30
OBrutus
9e34cad010 resize_window kitten: Go RC escape-code helper 2026-08-06 19:24:28 +05:30
Kovid Goyal
39feb5d3eb
Script to autoformat all files 2026-08-06 14:58:15 +05:30
Kovid Goyal
21772e43cd
start work on animation framework for custom shaders 2026-08-06 13:22:24 +05:30
Kovid Goyal
6a89fea569
Fix signing of slangc in macOS build 2026-08-06 09:58:56 +05:30
Kovid Goyal
7a436920de
Clean up previous PR 2026-08-06 08:18:25 +05:30
Kovid Goyal
8623b721e6
Merge branch 'add-elio-integration' of https://github.com/MiguelRegueiro/kitty 2026-08-06 08:16:45 +05:30
MiguelRegueiro
f7280f458c Add elio to graphics and DnD support lists 2026-08-05 20:12:23 +02:00
MiguelRegueiro
b6a9f7e9b4 Add elio to integrations 2026-08-05 19:39:10 +02:00
Kovid Goyal
cb4cefee5a
misc layout code robustness fixes 2026-08-05 21:04:30 +05:30
Kovid Goyal
3d02563153
Update changelog 2026-08-05 20:35:57 +05:30
Kovid Goyal
3cb7bfe594
Merge branch 'fix-session-inactive-layout-state' of https://github.com/chancez/kitty 2026-08-05 20:32:37 +05:30
Chance Zibolski
1b81045008 Save the layout state of every layout a tab has used to sessions
save_as_session recorded only the state of the tab's active layout, so the state
of any layout the tab had been toggled away from was lost. Toggling a splits tab
to the stack layout and saving discarded the splits tree entirely, because Stack
has no layout_state() of its own, and switching back to splits after restoring
rebuilt the tree from scratch along the default axis.

The session file also carried no last_used_layout, so _last_used_layout was None
after a restore and toggle_layout <current layout> silently did nothing, since it
delegates to last_used_layout() which returns early when unset. The key that
produced the stack layout no longer undid it.

Tab now keeps the layouts it has used, by name, and writes their state plus
last_used_layout into the existing set_layout_state JSON rather than adding new
session commands. Older versions of kitty ignore unknown keys in that dict but
abort on unknown commands, so nesting keeps session files readable by them.

Restoring the state of a layout that is not being made current must not reorder
the window list, since only the current layout determines window order, hence
apply_to_window_list. Splits.set_layout_state also has to accept state for a
layout whose tree is still empty, which is the case for a layout that has not
laid out any windows yet.

Fixes #10320
2026-08-05 07:53:47 -07:00
Kovid Goyal
51b0993b5c
Try newer clang-format installed via pip 2026-08-05 20:15:07 +05:30