Commit graph

19867 commits

Author SHA1 Message Date
Kovid Goyal
e0cef2ef8f
autoformat
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-11-02 16:40:49 +05:30
Kovid Goyal
4a435e4fe6
macOS: Fix reloading config causing global menubar shortcuts injected by Apple to stop working
Fixes #10793
2026-11-02 16:27:47 +05:30
Kovid Goyal
7a6a235085
Merge branch 'dependabot/github_actions/actions-54a479d392' of https://github.com/kovidgoyal/kitty
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-11-02 09:59:05 +05:30
Kovid Goyal
3d1a2f1e88
Merge branch 'dependabot/go_modules/all-go-deps-5ff0830e14' of https://github.com/kovidgoyal/kitty 2026-11-02 09:58:54 +05:30
dependabot[bot]
6daa9f4f66
Bump the actions group with 2 updates
Bumps the actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/setup-python` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v7.0.0...v7.1.0)

Updates `github/codeql-action` from 4.39.0 to 4.39.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.39.0...v4.39.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: github/codeql-action
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-02 03:46:07 +00:00
dependabot[bot]
82ea0cfe3e
Bump the all-go-deps group with 2 updates
Bumps the all-go-deps group with 2 updates: [github.com/bmatcuk/doublestar/v4](https://github.com/bmatcuk/doublestar) and [github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil).


Updates `github.com/bmatcuk/doublestar/v4` from 4.10.3 to 4.10.4
- [Release notes](https://github.com/bmatcuk/doublestar/releases)
- [Commits](https://github.com/bmatcuk/doublestar/compare/v4.10.3...v4.10.4)

Updates `github.com/shirou/gopsutil/v4` from 4.26.9 to 4.26.10
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v4.26.9...v4.26.10)

---
updated-dependencies:
- dependency-name: github.com/bmatcuk/doublestar/v4
  dependency-version: 4.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
- dependency-name: github.com/shirou/gopsutil/v4
  dependency-version: 4.26.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-02 03:43:00 +00:00
Kovid Goyal
5a6ea12f29
remote_file: Only reset the terminal when stdout is a tty
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
Avoids writing escape codes into piped output and test logs.
2026-11-01 12:00:40 +05:30
Kovid Goyal
a65a01e099
Cleanup previous PR
Keep edit_loop free of side effects: it now reports whether the editor
was started and edit_and_upload decides whether to keep the local copy.
Print the recovery path verbatim instead of Go-quoted.
2026-11-01 11:06:40 +05:30
Kovid Goyal
72dddbd463
Merge branch 'codex/remote-file-preserve-failed-upload' of https://github.com/hezhizhen/kitty 2026-11-01 11:05:32 +05:30
Zhizhen He
32e6c525f9 remote_file: Preserve local edits after upload failure 2026-11-01 13:29:24 +08:00
Kovid Goyal
4c7990c5dc
Tests: Fix wait_till_child_exits failing with ECHILD when child is killed by a signal
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 child was reaped by the first waitpid() but since WIFEXITED was false the
loop continued and the next waitpid() raised ChildProcessError, hiding the
actual reason for the failure. Now report the signal and screen contents.
2026-11-01 08:50:24 +05:30
Kovid Goyal
fcf697a5e0
Cleanup previous PR
Strip the optional leading = from values attached to short options, matching
rg semantics (-e=foo means the pattern foo). Replace the rg execution based
test with unit tests of the argument rewriting.
2026-11-01 08:23:00 +05:30
Kovid Goyal
040347ba83
Merge branch 'codex/hyperlinked-grep-arguments' of https://github.com/hezhizhen/kitty 2026-11-01 08:18:54 +05:30
Zhizhen He
300f8c58cb hyperlinked-grep: Preserve short option values and stdin paths 2026-10-31 22:10:55 +08:00
Kovid Goyal
fe55cd1963
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
Store per color scheme auto theme state in a typed dataclass instead of
string built attribute names. Track which theme files were seen during
the directory scan rather than checking for existence afterwards, so a
file deleted mid-scan cannot invalidate unscanned themes. Reset
applied_theme when the applied theme file is deleted.

Always re-read theme files on config reload and apply the theme for the
current system color scheme. Previously, once the applied theme was
invalidated, reloads stopped refreshing theme files, so re-creating the
file had no effect until the next system color scheme change. This also
means theme files created after startup are now applied on reload.
2026-10-31 17:15:08 +05:30
Kovid Goyal
f988590dfa
Merge branch 'codex/auto-theme-invalidate-deleted-files' of https://github.com/hezhizhen/kitty 2026-10-31 17:12:54 +05:30
Zhizhen He
9c37638c0e Fix cached automatic themes surviving file deletion 2026-10-31 19:34:26 +08:00
Kovid Goyal
c93279d856
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
Move the D-Bus service Exec line generation into a helper with a fast unit
test instead of copying the test binary and re-executing it. Refuse paths
containing a carriage return, since D-Bus decodes \r as a newline and
rejects .service files containing a raw carriage return.
2026-10-31 09:28:45 +05:30
Kovid Goyal
8072376d27
Merge branch 'codex/portal-quote-service-executable' of https://github.com/hezhizhen/kitty 2026-10-31 09:27:07 +05:30
Zhizhen He
b6abbf7655 desktop-ui: Quote portal activation executable paths 2026-10-31 11:43:54 +08:00
Kovid Goyal
f2f7927ec5
Merge branch 'fix-desktop-ui-kitten-path-fallback' of https://github.com/devangpratap/kitty 2026-10-31 08:40:55 +05:30
Kovid Goyal
ccecfa037b
Cleanup previous PR 2026-10-31 08:33:43 +05:30
Kovid Goyal
0ffa8e1412
Merge branch 'codex/themes-isolate-picker-cache' of https://github.com/hezhizhen/kitty 2026-10-31 08:32:47 +05:30
devangpratap
cab970b015 desktop-ui: Use the kitten path fallback when os.Executable fails
enable_portal checked eerr instead of err after filepath.Abs, so a failing
os.Executable always aborted with a nil error and the Which fallback was
never used, while an Abs error was ignored. Check err, and report the
os.Executable error if kitten is not in PATH either.
2026-10-30 22:34:06 -04:00
Zhizhen He
df02769ed1 themes: Isolate picker cache from unicode_input 2026-10-30 23:05:31 +08:00
Kovid Goyal
9575920aab
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
Track move source identities in drop_status rather than parsed_uri, and
also compare birth times where available, so that a replacement reusing
the inode number of a deleted source is not removed. Clarify the
changelog entry.
2026-10-30 18:28:40 +05:30
Kovid Goyal
d25a94fc68
Merge branch 'codex/dnd-preserve-replaced-move-sources' of https://github.com/hezhizhen/kitty 2026-10-30 18:26:18 +05:30
Kovid Goyal
88c5e1f6a0
Add a line to the spec to clarify that MIME types from first move only can be relied upon 2026-10-30 18:20:53 +05:30
Kovid Goyal
7fbe251750
dnd: Accept base64 payloads with trailing padding
libbase64's stream decoder fails every call made after it has seen
padding, even an empty one, so the empty message that terminates a
stream was rejected. Also size the decode buffers for pre-sent and
drag item data correctly, so that very short padded chunks such as
QQ== are not rejected.

Fixes #10777
2026-10-30 18:16:47 +05:30
Zhizhen He
7629533607 dnd: Only remove original sources after a local move 2026-10-30 20:29:16 +08:00
Kovid Goyal
6adff8efff
Fix hanging dnd kitten test
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-30 14:56:32 +05:30
Kovid Goyal
5bfb5659ba
Bump dependency for CVE 2026-10-30 14:29:10 +05:30
Kovid Goyal
f5c6ad38be
Cleanup previous PR 2026-10-30 14:24:59 +05:30
Kovid Goyal
d324482f5f
Merge branch 'codex/dnd-reject-source-alias-merges' of https://github.com/hezhizhen/kitty 2026-10-30 14:05:54 +05:30
Zhizhen He
c370368a48 dnd: Reject local moves that merge back into a source 2026-10-30 14:32:13 +08:00
Kovid Goyal
b8a70cf3d0
Desktop settings: Avoid duplicate portal queries and coalesce titlebar redraws
When the color scheme is queried at startup, wait for the reply to the
pending ReadAll request instead of making a second blocking ReadOne call,
only falling back to ReadOne if ReadAll failed or did not reply in time.
Session bus dispatching is now guarded against re-entrancy so this wait is
safe even when called from inside a DBus callback.

Coalesce titlebar redraws: settings changes only mark the titlebar dirty,
redrawing once after the initial ReadAll reply and once per burst of
SettingChanged signals via a short one-shot timer.

Fix the legacy Read color-scheme handler checking a stale type for the
nested variant and reading the value without verifying it is a uint32.
2026-10-30 10:07:13 +05:30
Kovid Goyal
2e283f4bc0
Condense changelog
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-30 09:33:25 +05:30
Kovid Goyal
1799286567
Update changelog 2026-10-30 09:27:42 +05:30
Kovid Goyal
51fae4211c
Wayland CSD: Guard against zero sized buffers and shadows at tiny scales
wl_shm buffers must have non-zero size and at scales below 1/24 the
shadow margin rounds to zero, which led to out of bounds reads when
compositing the shadow into the titlebar corners.
2026-10-30 09:22:13 +05:30
Kovid Goyal
2e71520e56
Wayland CSD: Track buffer release instead of recreating all buffers on every release
Previously, every time the compositor released a decoration buffer it was
destroyed and all decoration buffers, for all nine surfaces, were
recreated on the next update. In addition, the titlebar could be
rendered into a buffer the compositor had not yet released. Now buffers
are marked busy while attached and kept when released. The titlebar is
never rendered into a busy buffer, instead the render is done when the
buffer is released. Busy buffers are still not destroyed when freeing
buffers, to avoid flicker, they are destroyed when released.
2026-10-30 09:22:10 +05:30
Kovid Goyal
71e84574b9
Fix leaks and NULL dereference when creating a FreeType render context fails 2026-10-30 09:14:43 +05:30
Kovid Goyal
0c87f8ce94
Wayland CSD: Fix various correctness issues
- Dont re-render the titlebar on every pointer motion event. This both
  wasted CPU re-shaping the title and rendered into the buffer last
  attached to the titlebar surface without attaching the result.
- Notify of the window size change when the titlebar height changes in a
  docked window, as is done for configure events, and never set a non
  positive content height.
- Only wait for the desktop settings when creating the first window, since
  dispatching DBus from inside a DBus callback is not re-entrant.
- Apply cursor theme changes received via SettingChanged instead of
  silently updating the theme name.
2026-10-30 09:14:43 +05:30
Kovid Goyal
0331c873f9
Run autoformat 2026-10-30 09:07:45 +05:30
Kovid Goyal
84b93bd01c
Wayland CSD: Document the new decorations and remove the standalone tests
The standalone C tests compiled the glfw sources by including them and
stubbing internals and were not run by the test suite. Move the useful
parts of the markdown docs into the option docs and changelog.
2026-10-30 09:07:45 +05:30
Kovid Goyal
e37f4cd223
Wayland CSD: Cleanup titlebar rendering and button handling
Use enums for titlebar buttons and gestures instead of magic numbers
shared between files. Split up the titlebar renderer. Derive button
colors from the titlebar color so they fit in with custom titlebar
colors. Parse button layouts without a colon the way GTK does, all
buttons on the left. Restore the error message when the compositor
does not support showing the window menu.
2026-10-30 09:06:15 +05:30
Kovid Goyal
a2aa9b739d
Wayland CSD: Parse the titlebar font description once in glfw
Replace glfwGetSystemFont(), which returned a raw Pango font description
that was parsed separately in glfw and kitty, with glfwGetTitlebarFont()
that returns the parsed family, size and style. The parser now handles
font family lists, pixel sizes and the full set of Pango weight and style
names. A text scale less than one is now applied to the header height as
well. The FreeType context for the title font is released on exit and
failures to create it are not retried and reported on every redraw.
2026-10-30 09:03:46 +05:30
Kovid Goyal
53ba16881d
Wayland CSD: Wait briefly for desktop settings before creating a decorated window
On compositors without xdg-decoration, such as mutter, the titlebar height
depends on desktop settings that arrive asynchronously from the portal. If
they arrive after the window is mapped, the window visibly resizes. Wait
up to 200ms for the reply before creating the first such window.
2026-10-30 09:01:46 +05:30
Kovid Goyal
a5c48a3644
Wayland CSD: With system titlebar color and no desktop preference follow the window background
This was the behavior before the GNOME style CSD changes. Also restore
the previous semantics of the initial color scheme notification.
2026-10-30 08:59:34 +05:30
Kovid Goyal
6d6134ce16
Wayland CSD: Move titlebar settings handling into the Wayland backend
The desktop settings module is shared with X11 and should not walk the
window list and poke at Wayland decoration state. Use a platform hook
like the existing one for cursor theme changes. Also dont recompute
metrics and change window geometry on every title change, only when the
titlebar settings actually change.
2026-10-30 08:59:11 +05:30
Kovid Goyal
8853163337
Merge branch 'feature/wayland-gnome-csd' of https://github.com/acid0ikario/kitty 2026-10-30 08:57:46 +05:30