231 Commits

Author SHA1 Message Date
Kovid Goyal
d548a6fcf4 rename typing module to avoid conflicts with stdlib typing 2025-04-28 09:20:10 +05:30
Kovid Goyal
da1626090a Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
d56178d790 sigh, old python 2024-09-29 21:08:15 +05:30
Kovid Goyal
af83d855de Add a framework for easily and securely using remote control from the main function of a custom kitten 2024-09-29 20:36:12 +05:30
Kovid Goyal
8c1e365eb5 hints kitten: Allow clicking on matched text to select it in addition to typing the hint 2024-05-14 15:22:03 +05:30
Kovid Goyal
ede332fecf Use our monotonic everywhere
Gives nicer times relative to process start time than the python stdlib
monotonic
2024-03-26 13:26:18 +05:30
Kovid Goyal
8f1b30a25b No need to ask for 7bit controls anymore 2024-02-25 09:57:24 +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
Kovid Goyal
f8991ce3c8 ask kitten: Get readline to work even when stdout is redirected 2023-01-26 21:47:43 +05:30
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
pagedown
a131f9a82e Refactor: Use a consistent name for beam cursor shape 2022-11-19 10:34:50 +08:00
Kovid Goyal
5bf5454dbe Nicer fix for #5469 2022-09-04 22:15:17 +05:30
Kovid Goyal
31fe35cd38 Fix #5469 2022-09-04 13:58:16 +05:30
Kovid Goyal
fca0999814 Eureka! Figured out why libedit is breaking in prewarm on macOS via launchd
The prewarm zygote imports the world. shell.py had a top level import
for readline. Which means readline was being imported pre-fork. And of
course as is traditional with Apple libedit is not fork safe. Probably
because it initializes its internal IO routines based on the stdio
handles at time of import which are the handles kitty gets from launchd
2022-08-30 19:35:17 +05:30
Kovid Goyal
78056c659c Another place we cant use readline on macOS 2022-08-30 19:27:55 +05:30
Kovid Goyal
d0c50248ea Graphics protocol: Only delete temp files if they have the string tty-graphics-protocol in their file paths.
This prevents deletion of arbitrary files in /tmp via the graphics
protocol.
2022-08-16 11:25:33 +05:30
Kovid Goyal
7215c6d6be ssh kitten: Allow pressing Ctrl-C to abort ssh before the connection is completed
Fixing this involved adding a new mode to kitty where it handles
ctrl-c/z/q by sending signals to the tty foreground process group
instead of delegating to the kernel to do that. Since the pipe may be
full we have no way of knowing when the kernel will get around to
reading the signal byte. So send the signal ourselves.

Fixes #5271
2022-07-20 19:11:14 +05:30
Kovid Goyal
4f29dea8ef Utility function to detect when running inside tmux 2022-06-29 17:51:38 +05:30
Kovid Goyal
a89e1b5573 Fix horizontal wheel events not being reported to client programs when they grab the mouse
Fixes #2819
2022-06-18 06:47:42 +05:30
Kovid Goyal
9f5f113840 ... 2022-06-07 13:05:07 +05:30
Kovid Goyal
6afbdbe94f Use correct kitty config in prewarmed process 2022-06-07 12:53:39 +05:30
Kovid Goyal
0828096e9e ... 2022-06-03 18:30:14 +05:30
Kovid Goyal
ebcbed290f Make loading of kitty options in kitten re-useable 2022-06-03 17:49:58 +05:30
pagedown
16c6545e93 Report overlay ready in case of no match 2022-03-25 22:52:35 +08:00
Kovid Goyal
9eae4ad913 ... 2022-03-24 09:37:13 +05:30
Kovid Goyal
bfb8532c52 Jump through the hoops needed to ensure error reporting is done in case of early termination of kittens that use overlay ready notifications 2022-03-24 08:49:36 +05:30
Kovid Goyal
6dc1617429 Avoid flicker when starting kittens such as the hints kitten
Fixes #4674
2022-03-23 15:55:11 +05:30
Kovid Goyal
14e0b01b40 Echo asterisks when inputting the password 2022-03-11 16:44:08 +05:30
pagedown
cafc3973ec mouse_demo: Add mouse scroll wheel buttons 2022-02-13 16:45:48 +08:00
pagedown
436a57a61e mouse_demo: Fix mouse extra button bit mask 2022-02-13 16:36:51 +08:00
pagedown
4a3ed62809 Refactor: More f-string for kittens 2022-01-29 20:23:34 +08:00
Kovid Goyal
08f159c2ba TypeCheck underline style names 2022-01-22 12:41:26 +05:30
pagedown
7ef73babdd Use fixed values for unchanging dict to replace split and for loops 2022-01-22 11:36:04 +08:00
pagedown
a47aca6fdb Add new dotted and dashed underline enum
Also use "straight" for single underline, consistent with the protocol
extension document.
2022-01-22 11:00:49 +08:00
Kovid Goyal
4ce6d718c9 icat kitten: Add options to mirror images and remove their transparency before displaying them
Fixes #4513
2022-01-14 22:02:35 +05:30
Kovid Goyal
9aefcfe56f Make --hold a bit more robust 2022-01-05 08:14:22 +05:30
Kovid Goyal
90f2ba474c Fix icat for GIF images broken 2021-12-20 17:54:55 +05:30
pagedown
02a7316342 Use the unified PATH search function 2021-12-09 11:32:30 +08:00
Kovid Goyal
32768e7939 Unify the PATH searching algorithm for launch and running children 2021-12-08 20:10:34 +05:30
Kovid Goyal
715925795f Ignore errors in various finalizers during exit
This was needed for tui loop to exit cleanly when terminal i/o breaks
2021-11-17 15:43:26 +05:30
Kovid Goyal
17a48f6b9f TUI: exit cleanly when I/O to terminal fails 2021-11-17 15:33:23 +05:30
Kovid Goyal
5c7a1d1b05 Fix typo 2021-11-17 15:19:17 +05:30
Kovid Goyal
1a92f99831 ... 2021-11-17 13:55:33 +05:30
Kovid Goyal
14142c320a fix incorrect repeat counts 2021-11-17 13:24:35 +05:30
Kovid Goyal
727260e69b ... 2021-11-17 13:16:50 +05:30
Kovid Goyal
2443dc135c Use a faster implementation of the Color type
Now implemented in C
2021-10-28 11:15:13 +05:30
Kovid Goyal
60472fcee3 Add more type annotations 2021-10-27 14:00:29 +05:30
Kovid Goyal
4494ddd8ff mypy: Turn on return value checks
Its a shame GvR is married to "return None"
https://github.com/python/mypy/issues/7511
2021-10-26 22:39:14 +05:30
Kovid Goyal
6546c1da9b run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
ed5accd702 Add some common readline bindings to the line editor 2021-10-14 14:29:44 +05:30