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

Add block-image feature which forces rendering images using half blocks #228

Closed
wants to merge 1 commit into from

Conversation

m-torhan
Copy link
Contributor

@m-torhan m-torhan commented Aug 1, 2023

spotify-player with enabled image cannot run in zellij in kitty - it hangs on viuer::get_kitty_support(). To enable running spotify-player in zellij I added feature block-image which forces rendering images using half-blocks.

@m-torhan m-torhan changed the title Add block_image feature which forces rendering images using half blocks Add block-image feature which forces rendering images using half blocks Aug 1, 2023
@m-torhan m-torhan force-pushed the add-block-image-feature branch 2 times, most recently from e3e2e39 to 3776ad1 Compare August 1, 2023 16:46
@aome510
Copy link
Owner

aome510 commented Aug 2, 2023

spotify-player with enabled image cannot run in zellij in kitty - it hangs on viuer::get_kitty_support(). To enable running spotify-player in zellij I added feature block-image which forces rendering images using half-blocks.

Does it work in kitty outside zellij or in kitty inside other terminal multiplexers like tmux? It might be zellij bug.

That said, I found it weird to add an additional feature to force rendering images as ascii blocks. Is it better to not use image feature instead of using one with block rendering?

@m-torhan
Copy link
Contributor Author

m-torhan commented Aug 2, 2023

@aome510 it works well in kitty outside zellij (render full-res image). In tmux however it renders images using half-blocks, because the viuer::get_kitty_support() does not detect kitty.

I think having option to render images with ascii blocks when full-res is not available would be nice. I found a workaround for that without any changes in code - simply set TERM env var to anything and run spotify-player, so if you think this feature is not a good idea, feel free to close this PR.

@aome510
Copy link
Owner

aome510 commented Aug 3, 2023

Glad that you find a workaround. IMO, the issue is zellij-specific, so it should be fixed from that side. Adding a separate feature on top of image to render ascii blocks, which is the "fallback" option if no full-res option is available, feels kinda hacky to me.

I'll close this PR for now. Thanks for raising the issue and taking time to implement this though.

@aome510 aome510 closed this Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants