-
-
Notifications
You must be signed in to change notification settings - Fork 819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for subcommands in imgcat #3716
Comments
Would love to see this enhancement as well. The |
These allow additional control over image placement refs: #3716
Neither of these understand image protocols, and both are an additional processing layer between the application and wezterm. This commit detects and wraps OSC sequences in tmux's passthru sequence so that the data is passed on to wezterm rather than elided from the data stream. For image protocols in both tmux and conpty, work a little smarter and explicitly move the cursor position to the same location that wezterm would move it to. That prevents the display from being as mangled by tmux/conpty due to a diverging understanding of the cursor position. The logic isn't perfect, and can result in the x-coordinate being incorrect, and this won't work with the new --position argument either in its current state, without adding a lot of complexity to deal with scrolling and relative and absolute positioning handling. To facilitate that, a new termwiz Terminal trait method has been added to probe the terminal name, version, cell and pixel dimensions. It's not pretty. refs: #3624 refs: #3716
imgcat now has Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs. If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a |
I guess this might be an opportunity to call your attention to #3264 |
Thanks @wez. And thanks for wezterm - it's been awesome. Does this mean Also, how does the @Ultrahalf let me know if you're able to get this working as a file previewer for |
There are still a few open kitty image protocol bugs in wezterm, and I'd like to see those get wrapped up before I consider supporting that protocol in imgcat.
|
I also just pushed a commit with support for a few more options; that should show up in nightly builds in about an hour from now.
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Is your feature request related to a problem? Please describe.
I'm trying to use imgcat to preview files in my TUI file manager (LF). I couldn't figure out a way to clear and position the imgcat output.
Describe the solution you'd like
It would be helpful to have subcommads for position/clear similar to kitty icat
i.e:
wezterm imgcat --clear
wezterm imgcat --position {x}{y}
Describe alternatives you've considered
As mentioned in the example in the discussions
I have tried the following
which doesn't seem to work.
Additional context
related discussions
The text was updated successfully, but these errors were encountered: