Commit Graph

103 Commits

Author SHA1 Message Date
Kovid Goyal
4713cc29ad make gofmt happy 2025-05-16 09:40:34 +05:30
Kovid Goyal
c861259e3b Rename go module from kitty -> github.com/kovidgoyal/kitty
Makes the code more easily re-useable in other projects
2025-05-16 08:43:39 +05:30
Kovid Goyal
9854068a59 Start work on panel kitten wrapper in Go
Needed because we need to use a special exe on macOS.
2025-04-28 16:07:09 +05:30
Kovid Goyal
e42d410ee4 Move cli spec parsing code into simple module 2025-04-28 09:20:10 +05:30
Kovid Goyal
341df0dccb More CodeQL fixes 2025-04-20 22:13:45 +05:30
Kovid Goyal
575538c3f9 icat: Fix --no-trailing-newline not working when using unicode placeholders
Fixes #7948
2024-10-07 10:49:25 +05:30
Kovid Goyal
8eba162d32 ... 2024-10-06 10:33:25 +05:30
Kovid Goyal
173bf4a4a3 Disable in band resize notifications in a few more places 2024-08-21 12:11:14 +05:30
Kovid Goyal
5bb8378dc1 icat: Add an option to leave the cursor to the right of the image
Fixes #7574
2024-06-25 13:06:46 +05:30
Kovid Goyal
3b74fcb88c switch to a maintained fork of imaging 2024-03-22 10:38:22 +05:30
Kovid Goyal
e11081ac09 Use exiffix rather than imaging to handle EXIF rotation
exiffix works for more formats than just JPEG
2024-03-22 09:35:39 +05:30
Kovid Goyal
0eae7ba21d Remove unused parameter 2024-03-22 09:25:13 +05:30
Kovid Goyal
a3d8be5e2f icat: Nicer error when user specifies invalid screen geometry 2024-03-05 10:49:47 +05:30
Kovid Goyal
05881db492 Remove unused code 2024-02-28 12:15:20 +05:30
Kovid Goyal
b8774327b6 icat kitten: Add a command line argument to override terminal window size detection
Fixes #7165

I had five minutes, so why not.
2024-02-27 23:06:10 +05:30
Kovid Goyal
16d36c46fe Update to using math/rand/v2 2024-02-25 09:57:43 +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
a8a1571ed1 Fix #6715 2023-10-14 08:49:46 +05:30
Kovid Goyal
b26c4c16d0 ... 2023-09-22 12:11:07 +05:30
Kovid Goyal
c650bd0aac icat: Dont open the controlling terminal to query for size if stdout is a terminal, use it instead 2023-09-22 12:10:21 +05:30
Kovid Goyal
0a2f164062 Change kitty +kitten -> kitten in docs
All kittens except for the broadcast and panel kittens have now been
ported to Go and so can be run with just kitten rather than kitty
+kitten. So update the docs to use this canonical form for launching
kittens
2023-09-21 12:25:02 +05:30
Kovid Goyal
d16a29b942 More linter fixes 2023-09-19 11:50:09 +05:30
Kovid Goyal
8a211fa689 Remove unused code 2023-09-17 08:47:28 +05:30
Kovid Goyal
67bf3eda5a ... 2023-08-16 19:16:05 +05:30
Kovid Goyal
8e6dc030b4 Add a note that unicode placeholders cause image wrapping 2023-08-16 19:10:07 +05:30
Kovid Goyal
2c232ce709 kitten icat: Fix image being displayed one cell to the right when using both --place and --unicode-placeholder
Fixes #6556
2023-08-16 19:04:15 +05:30
olzhasar
d0a5d1b3a4 Fix misspellings 2023-06-14 03:39:53 +06:00
Kovid Goyal
ff55121094 Move the kittens Go code into the kittens folder 2023-03-27 13:06:02 +05:30
Kovid Goyal
88443ef8a5 icat: allow specifying image ids 2023-03-09 10:17:53 +05:30
Kovid Goyal
ed8a88e009 Add new unicode placeholder and tmux passthrough options to icat 2023-03-03 22:06:35 +05:30
Kovid Goyal
6b8e5ea225 Rename kitty-tool to kitten
It's easier to type, and cuter.

Also, most, if not all of the TUI parts of
kitty's kittens will eventually be re-written into kitten.

The only downside I can see is that we cant tab complete kitty
anymore, but hopefully there will be less reason to run kitty
from the shell as command line tools migrate to kitten.

Meowrrrr!!!
2023-01-14 15:44:52 +05:30
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
5d42d1f955 Remove the old python icat implementation
Keep the python backend code as it is used by the diff kitten to display
image diffs.
2023-01-05 19:34:12 +05:30
Kovid Goyal
a2c68a927e icat: When using --place ensure screen doesnt scroll by leaving cursor at top-left corner of image. 2023-01-05 19:15:13 +05:30
Kovid Goyal
c317c934f3 More work on ImageMagick 2023-01-05 19:15:13 +05:30
Kovid Goyal
df06578c2d Implement --scale-up and --place 2023-01-05 19:15:12 +05:30
Kovid Goyal
7a1140cd03 Start work on porting icat to Go 2023-01-05 19:15:10 +05:30
Kovid Goyal
7737369fc9 Add completion for the kittens 2022-11-14 15:41:58 +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
pagedown
c3df6d2fe3 Remove executable perms from kitten files 2022-06-28 11:59:47 +08:00
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
Mena Jacobs
c8a258f36b Fix icat fail on mac with --print-window-size
passing tty as TextIOWrapper to screen_size_function results in a TypeError since the screen_size_function expects an int. calling fileno() on tty gives us the desired int. This also fixes the kitty matplotlib backend, if MPLBACEND_KITTY_SIZING is not set to manual
2022-03-12 02:17:01 +01:00
pagedown
7cc3d5907f Docs: Prefer namespaced launch points 2022-02-08 01:07:23 +08:00
Kovid Goyal
58da5d4d29 Placate mypy 2022-01-14 22:26:05 +05:30
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
8bb2da3c37 Use with instead of closing manually 2022-01-14 21:12:08 +05:30
Kovid Goyal
9b9eae7923 icat: Fix --hold not working with critical errors 2022-01-08 10:22:22 +05:30
Kovid Goyal
8514782ad2 Remove unused code
icat already scales images to fit the screen in process_image() so dont
have to consider the case of the image being wider than the screen in
set_cursor()
2022-01-02 08:56:17 +05:30
Kovid Goyal
8f0825bc5c Various fixes for mypy 0.920 2021-12-17 05:56:19 +05:30
Kovid Goyal
f3376601f2 Mark various options in text correctly 2021-11-21 22:37:11 +05:30