72 Commits

Author SHA1 Message Date
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
Kovid Goyal
a26f041964
Add more type annotations 2021-10-27 12:31:10 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
DiegoBaldassar
8c104b52f9
icat: fix exception thrown if stdin is None
Don't use sys.stdin if --stdin=no is given, or if --stdin=detect is given and sys.stdin is None
2021-09-14 22:18:34 +02:00
Kovid Goyal
8e5175e56b
Revert "icat: Use scandir for slightly better performance"
This reverts commit 2e893690bd288108baff210f710a0d415b030c1c.
scandir is not recursive
2021-07-17 09:51:06 +05:30
Kovid Goyal
2e893690bd
icat: Use scandir for slightly better performance 2021-07-16 21:55:15 +05:30
Kovid Goyal
18186da90e
Better error message for people running icat on systems with outdated/broken ImageMagick 2021-03-12 11:28:57 +05:30
Kovid Goyal
fe07306ff1
Use a nicer decorator for functions that only need to be run once 2021-02-05 10:40:52 +05:30
Kovid Goyal
7a1785e1e8
Get chunked loading working with frames 2021-02-04 21:04:44 +05:30
Kovid Goyal
b479510f6c
Allow controlling the number of loops in icat 2021-02-04 17:47:53 +05:30
Kovid Goyal
0f18fedf13
Add support for animations to icat 2021-02-04 14:18:47 +05:30
Kovid Goyal
9cf5348c36
Modify ImageMagick wrapper to handle animated images 2021-02-01 14:12:26 +05:30
Kovid Goyal
75a94bcd96
Improving MIME type detection for some common file types when they are missing from the system MIME database
Also allow the user to specify their own database via mime.types in the
kitty config directory. See #3056
2020-10-25 13:42:11 +05:30
Kovid Goyal
e36d41b46f
Add a --hold option to icat
Keeps it alive after display images
2020-09-18 11:48:31 +05:30
Kovid Goyal
e39da2b2bb
Merge branch 'icat-http-timeout' of https://github.com/lamby/kitty 2020-05-11 16:58:21 +05:30
Chris Lamb
f08ec1522a Set a default socket timeout when retrieving remote items in icat.
Otherwise we can easily hang when "icat"-ing resources from unreliable
websites/webcams, etc.
2020-05-11 12:24:57 +01:00
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
01142cdc8c
Add type information to the Graphics Command infrastructure 2020-03-10 20:14:04 +05:30
Kovid Goyal
0a6e264d09
Fix #2414 2020-03-07 15:15:27 +05:30
Kovid Goyal
afec07b124
More typing work 2020-03-06 14:19:46 +05:30
Kovid Goyal
f05890719d
Add type checking for the various CLI options objects 2020-03-05 15:47:12 +05:30
Kovid Goyal
a4cc10c41b
More typing work 2020-03-04 06:10:57 +05:30
Kovid Goyal
91673642b3
icat: Allow easily specifying z-index values below background threshold 2020-01-12 09:36:11 +05:30
Kovid Goyal
fdb915d0c8
Merge branch 'zindex' of https://github.com/ctrlcctrlv/kitty 2020-01-08 18:20:34 +05:30
Fredrick Brennan
c2769c9aed Add --z-index to icat kitten
Meow.
2020-01-08 20:08:01 +08:00
Luflosi
b710ffc403
Fix icat kitten
Fixes https://github.com/kovidgoyal/kitty/issues/2081.
This bug was introduced in 10e5fcc37535fdf6eed7f03f1c5380a2b4f0db9c.

One place in the code requires the actual `screen_size_function`, not just the result of it.
2019-10-20 21:37:14 +02:00
Benoit de Chezelles
10e5fcc375 Fix usage of icat function show
The `screen_size` function was not initialized yet
2019-10-18 04:54:14 +02:00
Kovid Goyal
a5d6cd169e
Fix piping PNG images into the icat kitten not working
Fixes #1920
2019-08-24 08:04:04 +05:30
Kovid Goyal
c0a96f2087
icat kitten: Fix a regression that broke passing directories to icat
Fixes #1683
2019-06-05 07:36:47 +05:30
Kovid Goyal
5adf7c2a3a
icat kitten: Add a --silent flag to avoid printing anything to stdout
Useful for integration with other tools. See #1308
2019-02-27 09:02:15 +05:30
Kovid Goyal
502c31b408
icat: Ensure temp files are cleaned up 2019-02-15 10:08:25 +05:30