675 Commits

Author SHA1 Message Date
Kovid Goyal
424fe9991b Sanitise color control responses for shells that still dont use the kitty keyboard protocol 2026-06-09 06:21:15 +05:30
Kovid Goyal
ab673768b3 Add a line telling the user that the password request comes from program running in the window 2026-04-26 17:22:29 +05:30
Kovid Goyal
fcb260bdfa Sort imports 2026-04-19 21:53:09 +05:30
Kovid Goyal
04fcac72ec Update minimum python to 3.11 from 3.10
3.10 is failing in CI and I cant be arsed to figure out why. It's anyway
a few months from EOL
2026-04-19 21:41:58 +05:30
Bartek Mucha
f711e55a22 Expose window activity state in the kitty @ ls 2026-04-15 09:54:24 +01:00
Kovid Goyal
aceaef8a1d ... 2026-04-06 11:39:18 +05:30
Kovid Goyal
7036b10326 Padding at the sides of rendered dragged URL 2026-04-06 11:37:10 +05:30
copilot-swe-agent[bot]
9a878c9edc Accept keyword arguments in draw_single_line_of_text, use max_width=True in window.py, remove changelog entry
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/9a89a6c8-4bc2-4f11-9947-55b713b15348

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 06:01:59 +00:00
copilot-swe-agent[bot]
4bcfafa945 Improve draw_single_line_of_text to support max_width and return (pixels, width) tuple
- Add freetype_text_width_for_single_line() in freetype_render_ui_text.c
- Add cocoa_text_width_for_single_line() in core_text.m
- Add text_width_for_single_line() wrapper in glfw.c for both platforms
- Modify draw_single_line_of_text() to accept optional max_width parameter
- Return (pixels, width) tuple instead of just pixels
- Update all Python call sites in tabs.py and window.py

Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/508483db-ffcd-4d43-a8ee-83fcd3ec9c01

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-06 05:25:38 +00:00
Kovid Goyal
c88adfba98 Allow optionally dragging URLs with the mouse
Fixes #9804
2026-04-06 10:40:11 +05:30
Kovid Goyal
cf52a8289c ... 2026-04-03 08:31:42 +05:30
Kovid Goyal
c1947765f3 Fix #9799 2026-04-03 08:21:45 +05:30
copilot-swe-agent[bot]
973c5fb650 Implement OSC 9;4 progress bar rendering in kitty window
Fixes #9777
Fixes #9786
2026-03-31 22:45:25 +05:30
Kovid Goyal
53ec55a1da Cleanup previous PR
Fixes #9689
2026-03-31 21:10:31 +05:30
copilot-swe-agent[bot]
35ca3a178d Implement smooth animated scrolling for scroll_line_up and scroll_line_down
Fixes #9784
2026-03-31 21:02:53 +05:30
Kovid Goyal
9e79d3be9c Merge branch 'feat-draggable-window-title-bars' of https://github.com/mcrmck/kitty 2026-03-28 10:02:14 +05:30
Kovid Goyal
7e5aac2e2b Allow setting color table value to none via OSC 21 2026-03-27 20:50:28 +05:30
copilot-swe-agent[bot]
c2f6fd9155 Expose session_name in kitten @ ls output for each window (fix #9732)
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/kitty/sessions/98770c1a-7605-4597-a5ce-f27b35315930
2026-03-23 15:21:46 +00:00
Kovid Goyal
07099b3a3d Add a reminder about cloning shell envs being unsafe 2026-03-22 07:36:55 +05:30
mcrmck
462f7025fb Merge upstream/master into feat-draggable-window-title-bars
Resolves conflict in kitty/tabs.py by keeping both force_show_title_bars
and renaming_in_window fields.
2026-03-17 22:40:28 -04:00
Danny Dulai
226195d18c Add title_overridden field to kitty @ ls output 2026-03-17 12:25:44 -04:00
copilot-swe-agent[bot]
25f97f4ce5 Implement on_quit event for global watchers
Fixes #9682
2026-03-17 08:37:30 +05:30
Kovid Goyal
2c395a1ef9 Fix #9650 2026-03-12 18:03:53 +05:30
newwares
50a69cb093 Fix outdated check in paste confirmation 2026-03-11 16:37:48 -04:00
mcrmck
59c963c481 Add draggable window title bars
Implements drag-to-reorder for window title bars, following up on the
merged window title bar feature (#9450) and the design discussion in #9619.

- Drag a title bar and drop on another title bar to swap positions
- Drop on a window body quadrant (left/right/top/bottom) to insert as
  a directional split; Splits layout uses insert_window_next_to(), other
  layouts fall back to move_window_to_group()
- Drop on a tab bar tab to move the window into that tab
- Drop on another OS window to move into its active tab
- Drop outside kitty to detach into a new OS window
- Tab bar highlights the hovered tab during a window drag, mirroring
  how the destination window title bar is highlighted
- toggle_window_title_bars action temporarily force-shows title bars
  for drag-to-reorder when they are normally hidden, auto-hiding after
  the drag completes
- window_title_bar_drag_threshold option (default 5px) controls how far
  the mouse must move before a drag is initiated; 0 disables dragging

MIME type follows the same convention as tab dragging:
application/net.kovidgoyal.kitty-window-{PID}

Ref: #9619
2026-03-08 20:56:38 -04:00
Kovid Goyal
917616d09b Cleanup previous PR
Press on titlebar should focus window
2026-03-05 16:58:30 +05:30
Kovid Goyal
e1a14551fa Cleanup previous PR 2026-03-05 09:25:10 +05:30
Kovid Goyal
b66703ec85 Merge branch 'pane-title-bar' of https://github.com/mcrmck/kitty 2026-03-05 08:31:50 +05:30
mcrmck
f2ae5d0028 Add window_title_bar_min_windows option, simplify window_title_bar
- Add window_title_bar_min_windows (0=never, 1=always, 2+=threshold)
  similar to tab_bar_min_tabs, to control when title bars appear
- Remove 'none' choice from window_title_bar so it purely controls
  position (top/bottom); disabling is now via min_windows 0
- Only hide title bar for truly empty template strings, not
  whitespace-only, so users can have intentionally blank bars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 21:14:54 -05:00
mcrmck
dd26469cb3 Rework window title bar architecture per review feedback
- Eliminate double set_geometry() call: removed _apply_window_title_bars()
  which post-processed geometry causing expensive SIGWINCH to children
- Move title bar screen ownership to Window objects instead of central
  manager, with show_title_bar flag set during layout before do_layout()
- Window.set_geometry() now handles title bar geometry internally:
  self.geometry stays at layout-computed value (borders/padding correct),
  only C-side render data diverges via adjusted top/bottom
- Hide title bar for 1-row windows (ynum <= 1)
- Hide title bar when template evaluates to empty/whitespace
- Optimize C render loop: merge title bar GPU prep and draw into existing
  per-window loops, use trd pointer and is_visible=false, use
  num_visible_windows > 1 guard. Eliminates separate iteration passes.
- Simplify WindowTitleBarManager to thin coordinator

Note on C-side GPU prep placement: the suggested patch placed
send_cell_data_to_gpu for title bars inside the is_active_window branch
only. This caused a segfault (NULL deref in gleRunVertexSubmitImmediate)
because inactive windows' title bars had valid screen/geometry but no
GPU data uploaded, yet draw_cells was called for all visible title bars.
Moved to the per-window visibility block alongside the main window's
send_cell_data_to_gpu call so all visible title bars get GPU data
prepared. The draw loop matches the suggested patch exactly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 20:17:38 -05:00
Kovid Goyal
11e8ccb7c1 Fix categorisation of some show command actions 2026-03-03 15:36:02 +05:30
copilot-swe-agent[bot]
347c829156 Cleanup previous PR
Various fixes and improvements to the command palette kitten

Fixes #9585
2026-03-03 13:04:26 +05:30
Kovid Goyal
6b54c201e5 Track window ids on border rects
More robust. Splits layout still needs work.
2026-03-02 08:31:36 +05:30
Kovid Goyal
ea11959c7f Do not spam child processes with resize notifications while a drag resize is in progress
Avoids prompt corruption because of shells doing rapid redraws
2026-02-27 09:20:39 +05:30
Kovid Goyal
71c705a1bd When dropping text into the terminal apply the paste actions
This means control codes are now automatically sanitized or queried as
per paste actions settings.
2026-02-17 10:09:10 +05:30
Kovid Goyal
d333095437 Cleanup previous PR 2026-02-16 14:11:00 +05:30
littleblack111
5dfcfba50c Add copy_last_command_output_or_clipboard action
Adds a new keyboard action that copies the selected text to clipboard,
or if no selection exists, copies the last command output. This follows
the pattern of existing actions like copy_or_interrupt.
2026-02-16 15:33:03 +08:00
Kovid Goyal
d51dec8187 When dropping, paste into window under mouse cursor rather than active window 2026-02-04 21:21:25 +05:30
Kovid Goyal
75ce50400e Remote control: scroll-window: Allow fractional scrolling since we now have pixel scroll 2026-01-22 13:05:22 +05:30
Kovid Goyal
20b39ee163 Add a default mapping for searching the scrollback
Opens the scrollback pager in search mode. Particularly useful for
newbies on macOS that are used to using cmd+f to trigger search mode.

If there is a current selection, it is automatically searched for.
2025-12-01 08:10:07 +05:30
Kovid Goyal
eb44fa1682 Report color scheme preference change on config reload even when application has overriden the background color
Fixes #9253
2025-11-30 21:48:26 +05:30
Kovid Goyal
1c470fe1f7 ... 2025-11-17 12:46:54 +05:30
Kovid Goyal
e49d940621 kitten @ ls: Also output the neighbors for every window 2025-11-16 21:01:55 +05:30
Kovid Goyal
1faf786bd2 Remove parse error forsystemd's useless OSC 3008 context protocol
It's spamming the test logs. Just ignore it silently
2025-11-11 09:42:42 +05:30
Rafael Galhós
e29a374e04 Add action to copy the last command output 2025-11-04 20:07:13 +05:30
Kovid Goyal
ab6fec104a Add support for the paste events protocol
Fixes #9183
2025-11-04 15:02:19 +05:30
Jackie Li
ae29085e5c add state:focused_os_window to match window 2025-10-27 08:22:53 +00:00
Kovid Goyal
c2fb9f14b5 Only reset termios when user triggers reset action rather than in reponse to reset escape code
Fixes #9126
2025-10-18 08:53:50 +05:30
Kovid Goyal
ee9a5386b9 When doing a reset also reset termios to its initial state 2025-10-15 07:56:45 +05:30
Kovid Goyal
7c237dcb02 macOS: Fix progress bar on dock icon doubling speed with every indeterminate progress state without an intervening clear
Fixes #9114
2025-10-14 22:28:31 +05:30