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

image preview often disappears in st. #856

Closed
crocket opened this issue Apr 22, 2017 · 17 comments
Closed

image preview often disappears in st. #856

crocket opened this issue Apr 22, 2017 · 17 comments

Comments

@crocket
Copy link

crocket commented Apr 22, 2017

ISSUE TYPE

  • Bug report

RUNTIME ENVIRONMENT

  • Operating system and version: Gentoo Linux
  • Terminal emulator and version: st-0.7.0
  • Python version: python 3.4.5 [GCC 4.9.4]
  • Ranger version/commit: ranger-master 1.9.0b5 20f0f2b
  • Locale: en_US.utf8

EXPECTED BEHAVIOR

The image preview should remain intact, no matter what I do.

CURRENT BEHAVIOR

When I press shift in st, the image preview disappears.
If I revisit the image, the image preview reappears until I press shift or any other key.
The image preview disappears after a few seconds automatically.
It also disappears if I shift the focus to another window.

POSSIBLE SOLUTIONS

It doesn't happen in uxterm, but uxterm doesn't support fontconfig which st supports well.
I must have proper fontconfig support to read chinese characters in ranger.

I could use urxvt, but urxvt doesn't support fontconfig properly.

@crocket
Copy link
Author

crocket commented Apr 22, 2017

@SageEx According to #759 (comment), I set xfps to 300, but st fails to display image previews consistently.

@SageEx
Copy link

SageEx commented Apr 22, 2017 via email

@crocket
Copy link
Author

crocket commented Apr 23, 2017

w3mimgdisplay is slow and doesn't work with other terminals than xterm and urxvt.

A developer of st said he would implement SIXEL in st within a few months.
I think it'd be great for ranger to take advantage of the upcoming SIXEL support in st.

@crocket
Copy link
Author

crocket commented Apr 8, 2018

Luke Smith who runs a YouTube channel said this issue will be fixed in a few months, but he didn't provide me with an evidence. Does anyone have any evidence that this issue will be fixed?

@toonn
Copy link
Member

toonn commented Apr 11, 2018

They usually do : ) No one's stepped forward to implement sixel support yet. Tbqh, I'd rather st implement Kitty's image protocol from some short looking into this it seems like it's superior to sixel and kitty preview support is coming soon™.
Anyone can implement sixel previews for ranger though, it'd definitely get merged.

@crocket
Copy link
Author

crocket commented Apr 11, 2018

@toonn Actually, saitoha, the maintainer of sixel, implemented sixel support for st, but st maintainers haven't accepted his patches, yet.

https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809

https://git.suckless.org/st/log/

Will kitty preview support actually come to ranger or any terminal emulator soon? Can you refer me to evidences?

@toonn
Copy link
Member

toonn commented Apr 11, 2018

@crocket look at PR #1077, you can already run it if you somewhat know your way around git. Don't know of plans to get it in other terminal emulators though.
Upcoming sixel support in st is great. If you want it bad enough you could base an implementation on that PR ; )

@crocket
Copy link
Author

crocket commented Apr 11, 2018

@toonn That is not a pull request. Saitoha patched a lot of programs to add support for sixel, but all programs seem to have rejected his sixel patches for years. App developers are consistently delaying or rejecting sixel. Because suckless is obsessed with minimal codebase, I don't think sixel will be merged into st in the forseeable future.

It's very likely for suckless developers to say that people don't need image support in terminal emulators. Suckless developers rejected innate scroll support for st, too.

I moved from st to alacritty, but I'll move again to kitty once ranger assimilates kitty image preview functionality. w3m fails to persist image previews in alacritty.

I badly want persistent ranger image preview.

@toonn
Copy link
Member

toonn commented Apr 11, 2018

#1077 is most definitely a PR, I've been reviewing it since it was opened.

@crocket
Copy link
Author

crocket commented Apr 11, 2018

@toonn I was not talking about #1077. I was talking about https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 which has a slim chance of getting into st.

@toonn
Copy link
Member

toonn commented Apr 12, 2018

Ah, then you'll have to patch both st and ranger with sixel support, should be easy for st since the code's minimal. Might be relatively simple for ranger too.

@crocket
Copy link
Author

crocket commented Apr 12, 2018

I moved away from st because st will not accept sixel or any extra feature into its core. https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809 will rot away because the core will move on.

At this point, kitty would be the fastest way to get persistent image preview in ranger.
Sixel support for Alacritty is not planned, yet.

@toonn
Copy link
Member

toonn commented Apr 12, 2018

Ok. I'm going ahead and closing this issue since there's probably nothing we can do about it. I suspect this would have to be fixed in w3mimgdisplay itself.

@toonn toonn closed this as completed Apr 12, 2018
@alkeryn
Copy link

alkeryn commented Dec 22, 2018

Sorry for the necrobump but anyone know the version at whitch the sixel patch was made
could make it easier to update it going up in the git

@UgurcanAkkok
Copy link

I had the same issue, changing w3m_delay to 0.2 (in rc.conf) fixed the issue of dissappearing instantly/randomly, after any key press it still disappears but at least i can preview images now.

@libre-hackerman
Copy link

This patch made the previews with w3m work flawlessly (I applied it to st 0.8.4)

@sevi-kun
Copy link

I still had the problem with this st build
I fixed it with setting set w3m_delay to 0.1 instead of 0.02 in the ranger config.

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

No branches or pull requests

8 participants