Skip to content
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

fzf image preview window is empty when using Wezterm + bash + chafa on Windows #3682

Open
5 of 10 tasks
ykhan21 opened this issue Mar 17, 2024 · 3 comments
Open
5 of 10 tasks
Labels

Comments

@ykhan21
Copy link

ykhan21 commented Mar 17, 2024

  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

  1. Install scoop.
  2. scoop install git wezterm fzf chafa
  3. Set the following in the ~/.wezterm.lua config file to have bash as the default shell in Wezterm: config.default_prog = { 'c:/users/USERNAME/scoop/apps/git/current/bin/bash.exe -i -l' }.
  4. Start Wezterm. Observe that chafa -f iterm -s 50x50 image.jpg works correctly.
  5. Run ls image.jpg | fzf --preview 'chafa -s 50x50 {}'. This results in an empty preview window.

The image used for testing is: image.jpg.

I don't know if this is related to this. chafa was recommended over wezterm imgcat this the issue, but I don't know if Wezterm interprets chafa -f iterm as wezterm imgcat.

@junegunn
Copy link
Owner

Unfortunately, image support is currently not available on Windows.

Adding image support on Windows wasn't as trivial as I initially thought. Since I'm not a Windows user and have limited knowledge of the platform, I wasn't able to do it.

@ykhan21
Copy link
Author

ykhan21 commented Mar 17, 2024

I have limited knowledge of this myself, but it could be that Windows ConPTY might be interfering with the image previews, according to my understanding of this issue (mintty/mintty#1252). The program that create to output sixel graphics need to be compiled with cygwin to avoid ConPTY and other Windows APIs.

For what it's worth, on Windows, the mintty terminal (which is the Git Bash terminal on Windows) supports sixel and iterm graphics (https://mintty.github.io/) and Wezterm supports iterm graphics via the wezterm imgcat command.

Another relevant issue: wez/wezterm#1236.

@ykhan21
Copy link
Author

ykhan21 commented Mar 17, 2024

Also, it seems that the symbols format works when previewing with chafa, but the output image is not pretty.
ls image.jpg | fzf --preview 'chafa -s 50x50 -f symbols {}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants