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
roshal
149900a8e2
polish
2025-01-03 05:48:59 +03:00
Kovid Goyal
3367871408
Fix #7690
2024-08-03 07:17:46 +05:30
Kovid Goyal
92befa26db
Fix #6889
2023-12-07 09:30:04 +05:30
adriaan
382d2f1ed0
Update help in main.py
2023-11-26 16:53:31 +01:00
Kovid Goyal
9bb85bd294
ask kitten: Better error message when choice letter is not present in choice text. Fixes #6855
2023-11-26 10:10:50 +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
beb18cc250
Add window titles to various ask kitten invocations
2023-10-20 13:36:02 +05:30
Kovid Goyal
17ce474b79
Use hand pointer when hovering over buttons in ask kitten
2023-10-15 21:35:51 +05:30
Kovid Goyal
49ea26968c
Bump go version to 1.21
...
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
537cabca71
kitty +open: Ask for permission before executing script files that are not marked as executable
...
This prevents accidental execution of script files via MIME type
association from programs that unconditionally "open"
attachments/downloaded files via MIME type associations.
2023-05-07 08:11:39 +05:30
Kovid Goyal
ff55121094
Move the kittens Go code into the kittens folder
2023-03-27 13:06:02 +05:30
Kovid Goyal
f157882856
Finish porting of ask kitten to Go
2023-03-07 17:06:00 +05:30
Kovid Goyal
0aa55fb755
Start work on porting the ask kitten
2023-03-07 13:55:44 +05:30
Kovid Goyal
5338fcdc1e
Add a note about why we play with file descriptors
2023-01-26 21:50:10 +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
5b4e4f032d
ask kitten: Output JSON when used standalone
2023-01-22 11:48:51 +05:30
Kovid Goyal
0a1b399447
...
2023-01-22 08:58:14 +05:30
Kovid Goyal
7fe5d7b58f
Replace isort with ruff
2023-01-09 16:47:42 +05:30
Kovid Goyal
018811c96c
Remove unused code
...
Completion and remote control have moved into kitty-tool
2022-11-14 15:42:09 +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
d8e43a3412
macOS: Fix regression in 0.26.0 that caused asking the user for a line of input such as for set_tab_title to not work
...
Apparently libedit doesn't work in the forked process when the parent
process is run via Launch Services. I cant be bothered to investigate
why, given that libedit is closed source. macOS users will just have to
live without history/completion in the ask kitten until I get around to
writing a replacement for readline/libedit.
And on a personal note, macOS >> Necrotizing fasciitis
Fixes #5447
2022-08-30 16:45:14 +05:30
Kovid Goyal
bfcd324993
ask kitten: allow having hidden text in the message
2022-08-16 13:57:58 +05:30
Kovid Goyal
6961845167
ask kitten: fix button click area offset vertically
2022-08-16 10:35:51 +05:30
Kovid Goyal
cd3eeb7a95
Center choice message correctly when it is multi-line
...
Also fix button wrap calculation. It was not taking the borders into
account.
2022-08-10 20:34:25 +05:30
Kovid Goyal
7be6b28011
Preserve blanks lines and per line formatting in the ask kitten for the message with choices
2022-08-10 20:10:17 +05:30
pagedown
510022c3c1
Docs: Improve the documentation for kittens
...
Add more text roles and links.
Add an example that broadcasts only to other windows in the current tab.
Initial capitalization of the key names in the kbd text role.
Add Python type hints for custom kittens.
Note about hyperlink support for ls on macOS.
Add description text for show_key.
2022-04-27 16:14:54 +08:00
Kovid Goyal
d5c48ddb94
Allow inputting fingerprint check
2022-03-12 08:23:10 +05:30
Kovid Goyal
14e0b01b40
Echo asterisks when inputting the password
2022-03-11 16:44:08 +05:30
Kovid Goyal
5bb6b29ca3
Allow controlling the prompt used to input the password
2022-03-11 16:44:08 +05:30
Kovid Goyal
61558d518e
Get askpass basically working
2022-03-11 16:44:08 +05:30
Kovid Goyal
0a3acd9738
ask kitten: Use buttons for choices as well
2022-01-22 13:57:25 +05:30
Kovid Goyal
d4e7587686
use underline instead of color for default choice
2022-01-22 12:35:43 +05:30
Kovid Goyal
32e31a3c6b
Cancelling the choice kitten should return the empty response
2022-01-22 12:13:32 +05:30
Kovid Goyal
9419125387
Highlight the default choice in yellow
2022-01-22 11:45:01 +05:30
Kovid Goyal
1bbab217d0
ask kitten: Always have a default choice
2022-01-22 11:39:54 +05:30
Kovid Goyal
05d648d411
ask kitten: Draw yes/no buttons
2022-01-22 11:32:26 +05:30
Kovid Goyal
5c832d3190
Allow multiple clickable ranges
2022-01-22 10:52:44 +05:30
Kovid Goyal
0d33380e6a
Cleanup previous PR
...
yesno default should be yes.
Pressing q to quit is undiscoverable
Clicking empty cells should not trigger buttons as that is
undiscoverable and possibly surprising
2022-01-22 10:44:01 +05:30
Kovid Goyal
9944b895a6
Merge branch 'kitten-ask' of https://github.com/page-down/kitty
2022-01-22 10:06:52 +05:30
Kovid Goyal
fe7045dd2f
Ask kitten: Fix rendering of multiline messages
2022-01-22 09:40:05 +05:30
pagedown
4fe10fadb0
...
2022-01-22 09:45:32 +08:00
pagedown
88ee5e95fc
Add default choices for features that use ask kitten
2022-01-22 03:21:59 +08:00
pagedown
9a119255fe
ask kitten: Use the default value as input text
...
Prefill the current value when changing the tab title.
2022-01-22 03:11:39 +08:00
pagedown
7ce11050cd
ask kitten: Esc to abort and Enter to confirm the default choice
2022-01-22 02:50:50 +08:00
pagedown
9b4d1219b8
Add default choice option for ask kitten
2022-01-22 02:46:37 +08:00
pagedown
4dd29c726a
Make the clickable range of No the same as Yes
...
Since the two options are treated equally, the same amount of mouse
clickable range are given.
2022-01-22 02:41:52 +08:00
Kovid Goyal
17e31565e2
Get it working even with 2 row windows assuming they are wide enough to fit the title on a single line
2022-01-21 21:46:27 +05:30
Kovid Goyal
dd72deb546
Allow ask kitten to function in a 3 line window
2022-01-21 21:43:25 +05:30