Closed soredake closed 6 years ago
Can you elaborate on exactly what you want? Displaying a part of an image? Choosing what part of the screeen to display it in? All these things are already supported by the graphics protocol, which is what applications like ranger should use. But I am willing to add command line options for these to kitty icat as well, if needed.
for how to display parts of images in the graphics protocol.
I want 4 command line options (described later) inkitty icat
Reference parameters from vifm that w3mimgdisplay needs (not sure that all parameters are needed):
%px x coordinate of top-left corner of preview area;
%py y coordinate of top-left corner of preview area;
%pw width of preview area;
%ph height of preview area.
e.g. kitty icat $file %px %py %pw %ph
These co-ords are in cells or pixels?
They are expressed in number of characters.
https://github.com/ranger/ranger/blob/master/ranger/ext/img_display.py#L151-L194
e.g. i want functionality to display images in needed in the right place like the ranger and vifm doing with w3mimdisplay help
@kovidgoyal tried with vifm (fileviewer *.jpg,*.jpeg kitty icat --place=%pwx%ph@%pxx%py %c
) and kitty icat returns Must be run in a terminal, stdout is currently not a terminal
I have no idea how vifm works, but kitty icat will return that error if isatty() returns false for stdout or stdin. Is vifm redirecting those?
To support displaying images in ranger and vifm