[GH-ISSUE #389] Sixel output messed #210

Closed
opened 2026-03-02 23:45:30 +03:00 by kerem · 21 comments
Owner

Originally created by @71zenith on GitHub (Mar 5, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/389

Describe the bug
When i try to press an keychord such as g it shows the shortcut menu below Playback section.
This leads to the sixel image preview getting broken. When the keychord is completed , the playback section goes to its original position but sixel isn't redrawn.
I can make it redraw the image forcefully by resizing the terminal.

To Reproduce

  1. have sixel enabled
  2. play a song
  3. press a keychord (e.g. g l)
  4. the image preview is broken

Expected behaviour
I believe the solution could be either fixed by making the shortcut menu appear above the playback like pre 0.17.0 or making the screen redraw the image when it is changed

Screenshots
If applicable, add screenshots to help explain your problem.
image

Environment

  • OS: Nix OS(Linux)
  • Application version: 0.17.0
  • Application features: sixel
Originally created by @71zenith on GitHub (Mar 5, 2024). Original GitHub issue: https://github.com/aome510/spotify-player/issues/389 **Describe the bug** When i try to press an keychord such as `g` it shows the shortcut menu below Playback section. This leads to the sixel image preview getting broken. When the keychord is completed , the playback section goes to its original position but sixel isn't redrawn. I can make it redraw the image forcefully by resizing the terminal. **To Reproduce** 1. have sixel enabled 2. play a song 3. press a keychord (e.g. `g l`) 4. the image preview is broken **Expected behaviour** I believe the solution could be either fixed by making the shortcut menu appear above the playback like pre `0.17.0` or making the screen redraw the image when it is changed **Screenshots** If applicable, add screenshots to help explain your problem. ![image](https://github.com/aome510/spotify-player/assets/92977828/9afc51a1-24d6-4994-8d2d-ee3d2d146de2) **Environment** - OS: `Nix OS(Linux)` - Application version: `0.17.0` - Application features: sixel
kerem 2026-03-02 23:45:30 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@aome510 commented on GitHub (Mar 6, 2024):

Should be fixed by #390. Can you try running from that branch?

<!-- gh-comment-id:1979878251 --> @aome510 commented on GitHub (Mar 6, 2024): Should be fixed by #390. Can you try running from that branch?
Author
Owner

@71zenith commented on GitHub (Mar 6, 2024):

image
It does redraw but leaves some artifacts and the text from before isn't cleared

<!-- gh-comment-id:1981003863 --> @71zenith commented on GitHub (Mar 6, 2024): ![image](https://github.com/aome510/spotify-player/assets/92977828/90f7d137-09db-4c7c-8e94-3b83fdb6eb26) It does redraw but leaves some artifacts and the text from before isn't cleared
Author
Owner

@aome510 commented on GitHub (Mar 6, 2024):

image It does redraw but leaves some artifacts and the text from before isn't cleared

I don't have this problem for iterm2. It might happen because sixel doesn't render the image fully in the allocated area. Can you try to tweak cover_img_width, cover_img_length, cover_img_scale to see if those configs fix the issue?

Personally, I don't want to revert to the old popup behaviour in which popups are rendered above the playback (if in bottom) as it looks weird.

<!-- gh-comment-id:1981089191 --> @aome510 commented on GitHub (Mar 6, 2024): > ![image](https://private-user-images.githubusercontent.com/92977828/310535835-90f7d137-09db-4c7c-8e94-3b83fdb6eb26.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk3MzY2ODEsIm5iZiI6MTcwOTczNjM4MSwicGF0aCI6Ii85Mjk3NzgyOC8zMTA1MzU4MzUtOTBmN2QxMzctMDlkYi00YzdjLThlOTQtM2I4M2ZkYjZlYjI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA2VDE0NDYyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzOThlYjRjYzJhZjkyZjdlNjAzOWRlMTEyOTVmZDgxZGI4MGFhZjRmNDQ1MTA5OGIxZWZjNjJkNWI1MjRiYmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZUS_cVBvW6IHhyWyEd2vCxmc7wGfecUNyXaZhzupjNE) It does redraw but leaves some artifacts and the text from before isn't cleared I don't have this problem for `iterm2`. It might happen because sixel doesn't render the image fully in the allocated area. Can you try to tweak `cover_img_width`, `cover_img_length`, `cover_img_scale` to see if those configs fix the issue? Personally, I don't want to revert to the old popup behaviour in which popups are rendered above the playback (if in bottom) as it looks weird.
Author
Owner

@71zenith commented on GitHub (Mar 6, 2024):

I tried a number of scaling options. But the text is still under the image. Maybe if there is a way to replace the section under image with spaces just like how the rest of playback is overrides the popup text
image

<!-- gh-comment-id:1981164782 --> @71zenith commented on GitHub (Mar 6, 2024): I tried a number of scaling options. But the text is still under the image. Maybe if there is a way to replace the section under image with spaces just like how the rest of playback is overrides the popup text ![image](https://github.com/aome510/spotify-player/assets/92977828/eec516df-bd10-4e30-98b1-a4e7c8bd9758)
Author
Owner

@aome510 commented on GitHub (Mar 7, 2024):

I tried a number of scaling options. But the text is still under the image. Maybe if there is a way to replace the section under image with spaces just like how the rest of playback is overrides the popup text image

Scaling can be set to be >1 FYI, so you can make the image to cover the whole section with text artifact. Can also change length/width of the image rectangle to achieve the best-looking result. The default settings are not tuned for sixel at all as I don't really that feature.

If none of the above options works, I can take another look this weekend to see if there is a better way to fix the underlying issue.

<!-- gh-comment-id:1982321082 --> @aome510 commented on GitHub (Mar 7, 2024): > I tried a number of scaling options. But the text is still under the image. Maybe if there is a way to replace the section under image with spaces just like how the rest of playback is overrides the popup text ![image](https://private-user-images.githubusercontent.com/92977828/310559955-eec516df-bd10-4e30-98b1-a4e7c8bd9758.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk3ODUzMDQsIm5iZiI6MTcwOTc4NTAwNCwicGF0aCI6Ii85Mjk3NzgyOC8zMTA1NTk5NTUtZWVjNTE2ZGYtYmQxMC00ZTMwLTk4YjEtYTRlN2M4YmQ5NzU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA3VDA0MTY0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkODBmNjBhYzhkMGI0MGE2YWFjOTNlM2IzNzljZjBlYzRkNjM3M2M5ZTQzNzNlOWJjZGRmYmFmZjA2YzU0NzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fCYb1k-n-fmExYdb0Uuov8qtguYBuxBK3c204r-n3w0) Scaling can be set to be `>1` FYI, so you can make the image to cover the whole section with text artifact. Can also change length/width of the image rectangle to achieve the best-looking result. The default settings are not tuned for `sixel` at all as I don't really that feature. If none of the above options works, I can take another look this weekend to see if there is a better way to fix the underlying issue.
Author
Owner

@71zenith commented on GitHub (Mar 7, 2024):

I was using a scale of 2.2 before. I have managed to cover the text besides the image. But the text below the image still shows. Im assuming this can also be covered if i were to use width and height rather than scale but I'd rather not use that cause it looks out of place without proper scaling

<!-- gh-comment-id:1984340712 --> @71zenith commented on GitHub (Mar 7, 2024): I was using a scale of 2.2 before. I have managed to cover the text besides the image. But the text below the image still shows. Im assuming this can also be covered if i were to use width and height rather than scale but I'd rather not use that cause it looks out of place without proper scaling
Author
Owner

@aome510 commented on GitHub (Mar 10, 2024):

@71zenith figured out a better way to handle the re-draw. Can you try again with the latest change in https://github.com/aome510/spotify-player/pull/390?

<!-- gh-comment-id:1987335041 --> @aome510 commented on GitHub (Mar 10, 2024): @71zenith figured out a better way to handle the re-draw. Can you try again with the latest change in https://github.com/aome510/spotify-player/pull/390?
Author
Owner

@71zenith commented on GitHub (Mar 11, 2024):

I tried it but the problem still remains
image

<!-- gh-comment-id:1988066350 --> @71zenith commented on GitHub (Mar 11, 2024): I tried it but the problem still remains ![image](https://github.com/aome510/spotify-player/assets/92977828/97c39b5d-b5bf-471a-aed3-e29ead9e3ae8)
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

I tried it but the problem still remains image

Hmm super weird. That means Clear doesn’t clear the area.

<!-- gh-comment-id:1988400062 --> @aome510 commented on GitHub (Mar 11, 2024): > I tried it but the problem still remains ![image](https://private-user-images.githubusercontent.com/92977828/311666320-97c39b5d-b5bf-471a-aed3-e29ead9e3ae8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTAxNjIzNTYsIm5iZiI6MTcxMDE2MjA1NiwicGF0aCI6Ii85Mjk3NzgyOC8zMTE2NjYzMjAtOTdjMzliNWQtYjViZi00NzFhLWFlZDMtZTI5ZWFkOWUzYWU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzExVDEzMDA1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI5ZGYxMGQ5MGMzMTljN2JmMDA5ODdkOTgzNGFhYzU2NDg2Y2MwYWRhOWI1OTIyNTMyMTI2ZWNiMGQ3YzA1N2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ADBZxgxLLpsX6bbi4t_ywm8M_keGOpX4KaiNpFTjcHM) Hmm super weird. That means `Clear` doesn’t clear the area.
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

Can you share the configs you are using now, e.g what is the width/length of the cover image rectangle, width of the playback window?

<!-- gh-comment-id:1988417073 --> @aome510 commented on GitHub (Mar 11, 2024): Can you share the configs you are using now, e.g what is the width/length of the cover image rectangle, width of the playback window?
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

@71zenith , I managed to add some hacks to reproduce your issue with iterm2. Pushed a fix, which I strongly believe should fix the issue.

<!-- gh-comment-id:1988587865 --> @aome510 commented on GitHub (Mar 11, 2024): @71zenith , I managed to add some hacks to reproduce your issue with `iterm2`. Pushed [a fix](https://github.com/aome510/spotify-player/pull/390/commits/0b8da217386cdd6e0ee58eaba240c087f786a062), which I strongly believe should fix the issue.
Author
Owner

@71zenith commented on GitHub (Mar 11, 2024):

border_type = "Hidden"
client_id = ""
client_port = 8080
cover_img_scale = 2.4
default_device = ""
enable_media_control = true
liked_icon = ""
pause_icon = " "
play_icon = " "
playback_window_position = "Bottom"
progress_bar_type = "Rectangle"
theme = "oxocarbon"
track_table_item_max_len = 32
tracks_playback_limit = 5

[device]
audio_cache = false
bitrate = 320
device_type = "speaker"
name = ""
<!-- gh-comment-id:1988669278 --> @71zenith commented on GitHub (Mar 11, 2024): ```toml border_type = "Hidden" client_id = "" client_port = 8080 cover_img_scale = 2.4 default_device = "" enable_media_control = true liked_icon = "" pause_icon = " " play_icon = " " playback_window_position = "Bottom" progress_bar_type = "Rectangle" theme = "oxocarbon" track_table_item_max_len = 32 tracks_playback_limit = 5 [device] audio_cache = false bitrate = 320 device_type = "speaker" name = "" ```
Author
Owner

@71zenith commented on GitHub (Mar 11, 2024):

@71zenith , I managed to add some hacks to reproduce your issue with iterm2. Pushed a fix, which I strongly believe should fix the issue.

Sadly it still doesnt fix it.

<!-- gh-comment-id:1988674485 --> @71zenith commented on GitHub (Mar 11, 2024): > @71zenith , I managed to add some hacks to reproduce your issue with `iterm2`. Pushed [a fix](https://github.com/aome510/spotify-player/pull/390/commits/0b8da217386cdd6e0ee58eaba240c087f786a062), which I strongly believe should fix the issue. Sadly it still doesnt fix it.
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now?

<!-- gh-comment-id:1988708011 --> @aome510 commented on GitHub (Mar 11, 2024): Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now?
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

My last attempt in https://github.com/aome510/spotify-player/pull/390/commits/4f28c2e54056cc1f8ac0185f2d6802386a391359, if this still does not work. I'll revert to the old behaviour (popup above playback for bottom) then 😞 .

<!-- gh-comment-id:1988768405 --> @aome510 commented on GitHub (Mar 11, 2024): My last attempt in https://github.com/aome510/spotify-player/pull/390/commits/4f28c2e54056cc1f8ac0185f2d6802386a391359, if this still does not work. I'll revert to the old behaviour (popup above playback for bottom) then 😞 .
Author
Owner

@71zenith commented on GitHub (Mar 11, 2024):

Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now?

Image is rendered correctly but it still has text below it

<!-- gh-comment-id:1988956759 --> @71zenith commented on GitHub (Mar 11, 2024): > Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now? Image is rendered correctly but it still has text below it
Author
Owner

@aome510 commented on GitHub (Mar 11, 2024):

Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now?

Image is rendered correctly but it still has text below it

Are u using the latest version of https://github.com/aome510/spotify-player/pull/390?

<!-- gh-comment-id:1988999670 --> @aome510 commented on GitHub (Mar 11, 2024): > > Does it still have text under the image or different issue with image not fully rendered, which I'm aware of and trying to fix now? > > Image is rendered correctly but it still has text below it Are u using the latest version of https://github.com/aome510/spotify-player/pull/390?
Author
Owner

@71zenith commented on GitHub (Mar 11, 2024):

I am yes

<!-- gh-comment-id:1989109592 --> @71zenith commented on GitHub (Mar 11, 2024): I am yes
Author
Owner

@aome510 commented on GitHub (Mar 12, 2024):

Still don't understand why my latest patch didn't work for you 😕. That said, I reverted the rendering order back to before v0.17.0 so it should work now. Thank you for all the back-and-forth!

<!-- gh-comment-id:1989881460 --> @aome510 commented on GitHub (Mar 12, 2024): Still don't understand why my latest patch didn't work for you 😕. That said, I reverted the rendering order back to before `v0.17.0` so it should work now. Thank you for all the back-and-forth!
Author
Owner

@71zenith commented on GitHub (Mar 12, 2024):

@aome510 i am really really sorry. it looks like i did a build for release and was testing the binary for debug. It works perfectly with your last patch without any artifacts. I should have tested more clearly

<!-- gh-comment-id:1991296402 --> @71zenith commented on GitHub (Mar 12, 2024): @aome510 i am really really sorry. it looks like i did a build for release and was testing the binary for debug. It works perfectly with your last patch without any artifacts. I should have tested more clearly
Author
Owner

@aome510 commented on GitHub (Mar 12, 2024):

No worries. Glad to hear that I'm not hallucinating. I can push a "revert revert" change xD

<!-- gh-comment-id:1991809114 --> @aome510 commented on GitHub (Mar 12, 2024): No worries. Glad to hear that I'm not hallucinating. I can push a "revert revert" change xD
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#210
No description provided.