Commit graph

20010 commits

Author SHA1 Message Date
Kovid Goyal
cfb9b25ec6
Merge branch 'pr-10692' 2026-10-18 21:28:12 +05:30
Arthur Cerqueira
ce6ab5124e
Shell integration: preserve TERMINFO when using run0 2026-10-18 21:28:12 +05:30
Kovid Goyal
a2b7721bfb
Fix #10694 2026-10-18 21:03:47 +05:30
Zhizhen He
23efab20d8
set-font-size: Support multiplication and division in mappings
Recognize all documented relative operators in the Python remote-control
parser and parse their numeric operand separately. Add regression coverage
for mapping dispatch with and without --all, and a changelog entry.
2026-10-18 18:56:11 +08:00
Kovid Goyal
56deb9e86d
transfer kitten: Fix receiving empty files
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
The output file for a regular file was only created when the
decompressor first emitted data, which never happens for an empty file.
So empty files were not created and existing destination files were
left with their old contents. Open the output file as soon as the first
chunk for a regular file arrives instead.

Closes #10689
2026-10-18 14:33:13 +05:30
Kovid Goyal
3494fbda51
action: Give context in remote control parse error messages
Include the action definition in the error and avoid the quoted repr
that str() produces for KeyError. Use a spec'd Mock in the tests so
unexpected Boss attribute access fails, and reference the PR in the
changelog.
2026-10-18 14:16:11 +05:30
Kovid Goyal
9b8124ac23
Merge branch 'pr-10688' 2026-10-18 14:15:01 +05:30
Zhizhen He
9c21523215
action: Report parsing errors to remote control clients 2026-10-18 15:48:36 +08:00
Kovid Goyal
2d59dd477a
... 2026-10-18 12:55:28 +05:30
Kovid Goyal
26ebab22da
Merge branch 'fix/cli-required-values' of https://github.com/M-Hassan-Raza/kitty 2026-10-18 12:55:00 +05:30
Kovid Goyal
7871d53ab1
Fix #10686 2026-10-18 12:54:26 +05:30
Hassan Raza
3d3d2abfe0
Reference the CLI option fix in the changelog 2026-10-18 11:49:00 +05:00
Hassan Raza
a77b763960
Cover missing values after grouped and repeated options 2026-10-18 11:47:32 +05:00
Hassan Raza
608e46be33
Reject options whose required value is missing 2026-10-18 11:46:17 +05:00
Hassan Raza
b1df817c44
Cover missing values on CLI option aliases 2026-10-18 11:45:33 +05:00
Kovid Goyal
2efa09dd07
Fix #10684 2026-10-18 08:28:21 +05:30
Kovid Goyal
22cfda44df
Fix visual window select treating an empty allowed set as unrestricted
An empty only_window_ids meant every window was selectable, so for example
select-window --exclude-active in a single window tab returned the active
window. Use None to mean unrestricted instead.

Closes #10683
2026-10-18 08:11:51 +05:30
Kovid Goyal
c0b384f310
Cleanup previous PR 2026-10-18 07:58:49 +05:30
Kovid Goyal
e9bd5a93f8
Merge branch 'pr-10682' 2026-10-18 07:57:46 +05:30
Hassan Raza
d6061b4270
Report cursor rows relative to the origin margin 2026-10-17 13:37:52 +05:00
Hassan Raza
7e936d87e0
Cover origin-relative cursor position reports 2026-10-17 13:37:10 +05:00
Kovid Goyal
f7a16a9319
Show custom OS window and tab titles in the detach_tab chooser
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
Store fixed OS window titles at creation time so they can be queried,
and add an only_if_overridden flag to get_os_window_title so callers
can distinguish a custom title from the cached active window title.
The detach_tab chooser now uses the custom OS window title if any,
falling back to the tab's effective title.

This also fixes launch --os-window-title=current not copying a fixed
title and Wayland CSD titles of fixed title windows not being
re-rendered on font size changes.

Closes #10681
2026-10-17 12:37:54 +05:30
Kovid Goyal
bea239edb1
Allow narrower vertical tab bars
When tab_title_max_length is set, size the vertical tab bar to fit the
decorations drawn by the current tab_bar_style instead of always adding
eight cells. Also allow powerline tabs in vertical tab bars to show a
title in a narrow tab bar, since the separator has a column of its own.

Fixes #10680
2026-10-17 11:35:23 +05:30
Kovid Goyal
277ff7f1e1
Fix #10679 2026-10-17 11:12:49 +05:30
Zhizhen He
bb4a3324e7
Fix remote_control run with non-terminal stdin 2026-10-17 13:12:22 +08:00
Kovid Goyal
b7a657de10
Fix ls --self and --output-format being ignored in remote_control mappings
The Python implementation of message_to_kitty did not forward these
options in the payload, so they only worked via kitten @.
2026-10-17 10:15:49 +05:30
Kovid Goyal
488b1415a6
Merge branch 'codex/fix-set-enabled-layouts-configured' of https://github.com/hezhizhen/kitty 2026-10-17 10:14:35 +05:30
Zhizhen He
38004ded76
Fix --configured in set-enabled-layouts mappings 2026-10-17 10:28:04 +08:00
Kovid Goyal
5c89ea9a1a
Cleanup previous PR
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
Apply the --exclude-active filter in RemoteCommand.windows_for_payload so
every command using it honors the flag, instead of each command filtering
by hand. Extend the send-key test to cover --match, --match-tab and the
default active window fallback.
2026-10-16 21:04:41 +05:30
Zhizhen He
07ab3d3409
send-key: Honor --exclude-active
Exclude the active window before dispatching keys when requested. Add a
regression covering both values of the option with distinct active and
invoking windows, and update the changelog.
2026-10-16 23:09:18 +08:00
Kovid Goyal
f426c08f5d
Apply deferred directory permissions children first when extracting tar
A parent directory without search permission prevents changing the
permissions of its children, so apply the deferred chmods in reverse
order, as GNU tar does. Also add a test and changelog entry for #10676.
2026-10-16 19:12:51 +05:30
Kovid Goyal
92a3723d42
Merge branch 'fix-tar-readonly-dirs' of https://github.com/devangpratap/kitty 2026-10-16 19:11:36 +05:30
devangpratap
6e41991430 Fix extracting tar archives with read-only directories 2026-10-16 09:26:26 -04:00
Kovid Goyal
dad7089d10
make a note that saved session data can be read by any process that runs as the user 2026-10-16 17:21:40 +05:30
Kovid Goyal
01a2aabc56
Fix #10675
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 17:10:00 +05:30
Kovid Goyal
7e88f51ed7
Some minor robustness fixes to glfw cocoa backend 2026-10-16 14:02:01 +05:30
Kovid Goyal
0ea80af638
Fix #10672 2026-10-16 13:03:15 +05:30
Kovid Goyal
7e2a3cf81f
Fix #10673 2026-10-16 12:57:07 +05:30
Kovid Goyal
cd1dc74270
Add a reference to the PR that was inspiration for session restore 2026-10-16 12:45:14 +05:30
Kovid Goyal
7c35cc6429
Remove orphaned keychain keys of sessions saved at logout
Keys whose snapshot no longer exists, for example because it was deleted
by a cache cleaner or because the keychain was locked when deleting it,
are deleted when saving at logout, when claiming snapshots at startup and
when removing all snapshots. This is done with the snapshot lock held, so
snapshots being saved or restored are never affected. Only keys with the
format of the ids kitty creates are deleted.
2026-10-16 12:02:20 +05:30
Kovid Goyal
8f0b7eff31
Encrypt sessions saved at logout with a key in the macOS Keychain
Every snapshot is encrypted with AES-256-GCM using a random key, stored
in the login keychain under a random id. The name of every file is
authenticated, so files cannot be swapped. The key is deleted before the
snapshot whenever it is removed, so copies of the snapshot left on disk
or in backups cannot be read.

The keychain is never allowed to show any UI. If storing the key fails
nothing is saved, if reading it fails the snapshot is deleted, with the
error logged in both cases.

The key is generated, stored and read only in C, in mlocked memory that
is cleared when freed, via a new random_secret() and the Keychain
functions in cocoa_window.m.
2026-10-16 11:57:31 +05:30
Kovid Goyal
76a00e5142
macOS: Optionally restore kitty, including scrollback, after logging out
A new option restore_session_after_logout. When macOS asks kitty to quit
because the user is logging out, restarting or shutting down, every kitty
instance saves a snapshot: its session, including OS Window geometry, the
scrollback of every window and the command line, working directory and
environment of the instance.

The next kitty started without a session or command to run claims all
snapshots, restores the one saved by an instance with the same command
line itself and starts a separate kitty instance for each of the others,
so every instance keeps its own command line arguments and environment.
Snapshots are deleted only after their windows have been created. A
snapshot that fails to restore twice, for example because kitty crashed,
is deleted. Snapshots from an earlier logout that were never restored are
deleted when saving, using the wall clock start time of the process.

Restored scrollback is parsed before the child is allowed to run, after
the window has its final size. Only the scrollback and screen are saved,
not the scrollback pager history. Before parsing, everything except SGR,
OSC 8 and OSC 66 is removed, so a modified snapshot cannot run escape
codes such as OSC 52, and the restored output has no shell integration
marks. Programs other than the shell are not started again.

A quit is treated as being for a logout only if it is confirmed within
LOGOUT_CONFIRMATION_TIMEOUT of the logout request, and not if the quit
was cancelled in between.

Fixes #1197
2026-10-16 11:41:27 +05:30
Kovid Goyal
d4eb2b34e6
Sessions: Add os_window_position and save_as_session --os-window-geometry
The geometry of fullscreen OS Windows is the one from before they were made
fullscreen. On macOS this is now also recorded when using native fullscreen
via the window buttons/menu.
2026-10-16 11:29:28 +05:30
Kovid Goyal
beca032240
Ignore initial OS Window positions that are not on any monitor
This applies to --position, remember_window_position and positions from
sessions, which could otherwise place the window on a monitor that is no
longer connected.
2026-10-16 11:27:13 +05:30
Kovid Goyal
6a3cfbcb10
Sessions: Fix os_window_size being ignored when remember_window_size is enabled
A size specified in the session now takes precedence over both the
remembered size and the remembered maximized state.
2026-10-16 11:26:53 +05:30
Kovid Goyal
92e2fc477c
Fix on_quit watchers being called repeatedly when they abort an OS quit request
When an on_quit watcher aborted a quit, the application quit request was
left as CONFIRMABLE_CLOSE_REQUESTED, so process_pending_closes() called
boss.quit() on every tick.
2026-10-16 11:26:07 +05:30
Kovid Goyal
10b3792dfb
misc improvements for indexed color images 2026-10-16 11:13:14 +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
b954c5818b
Merge branch 'docs-load-config-file' of https://github.com/ihsandeniz/kitty 2026-10-16 07:19:33 +05:30
Kovid Goyal
50ede63f29
... 2026-10-16 07:05:23 +05:30