55 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
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
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
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
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
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
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
44bcbc4823 Make it easier to handle simple click events 2021-09-28 20:12:55 +05:30
Kovid Goyal
343eb56cdf Fix import of MouseEvent 2021-09-28 15:46:35 +05:30
Kovid Goyal
f3447d187d Allow handlers to ask for mouse events 2021-09-28 09:32:53 +05:30
Kovid Goyal
7e17ed21ce Use the atomic update decorator everywhere 2021-09-27 12:00:33 +05:30
Kovid Goyal
b1f4b2d8ed Use pending updates for unicode input kitten
Avoids all possibility of flicker
2021-09-27 11:33:21 +05:30
Kovid Goyal
f9c99a61d4 More work on file transfer 2021-09-09 12:59:31 +05:30
Kovid Goyal
8aacf30f19 Centralize definition of file transfer OSC code 2021-09-08 13:43:59 +05:30
Kovid Goyal
96326280e5 Use a pending update when drawing the screen 2021-08-04 22:06:05 +05:30
Kovid Goyal
ff191c9404 clipboard kitten: fix copies to clipboard not working without the --wait-for-completion option 2021-07-24 07:55:50 +05:30
Kovid Goyal
6d7df1c5e8 Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
9c6ba213f9 Fix key handling in diff kitten 2021-01-16 20:52:14 +05:30
Kovid Goyal
027c5a57f1 Work on porting kittens to use new key infrastructure
Also move type definitions into their own module
2021-01-16 20:52:14 +05:30
Kovid Goyal
382c31ddf2 Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
149ae2866a more typing work 2020-03-12 08:10:51 +05:30
Kovid Goyal
2ebdf738ca more typing work 2020-03-11 20:08:16 +05:30
Kovid Goyal
ce94a9b2df More typing work 2020-03-11 09:35:59 +05:30
Kovid Goyal
bb8cab3a02 Add type information for tui operations cmds 2020-03-10 22:25:57 +05:30
Kovid Goyal
01142cdc8c Add type information to the Graphics Command infrastructure 2020-03-10 20:14:04 +05:30
Kovid Goyal
c9ce2f47dc No top level typing issues found in kitty package 2020-03-04 07:31:22 +05:30
Kovid Goyal
5730ce5f53 More typing work 2020-03-03 20:18:24 +05:30
Kovid Goyal
8ebad06e7e clipboard kitten: Add a --wait-for-completion option to have the kitten wait till copying to clipboard is complete
Fixes #1693
2019-06-07 07:13:15 +05:30
Luflosi
a792c94ccf Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
0b662ecb9a Refactor the kittens tui loop to use asyncio
Gets us timers and various jobs for free, and makes it easier to
integrate with libraries that use asyncio from the larger python
ecosystem.
2018-07-15 15:27:35 +05:30
Kovid Goyal
4b259dd719 diff kitten: Make the keyboard shortcuts configurable
Fixes #563
2018-05-23 13:10:32 +05:30
Kovid Goyal
d3edd2e73f Add a kitten to get/set the clipboard via OSC 52 2018-05-21 23:24:27 +05:30
Kovid Goyal
fb57653665 Make debugging kittens a little nicer
Now debug() writes to the stderr of the parent kitty process instead of
a temp file.
2018-05-19 16:32:08 +05:30
Kovid Goyal
8ea84c97d5 Use an overlay window for window resizing
Also implement a remote command to resize windows
2018-05-17 23:26:41 +05:30
Kovid Goyal
2e69b904da diff: More work on images 2018-05-09 14:06:15 +05:30
Kovid Goyal
d133ffac25 Make using tui.operations more convenient 2018-05-06 15:34:11 +05:30
Kovid Goyal
5c4b14468c Apply default colors in diff kitten 2018-04-24 10:33:18 +05:30
Kovid Goyal
20c42ab519 tui: Allow handlers to finalize() as well as initialize() 2018-04-22 13:14:25 +05:30
Kovid Goyal
92bb6e293a Add threaded job infrastructure to tui 2018-04-20 21:12:10 +05:30