mierak / rmpc

A configurable, terminal based Media Player Client with album art support via various terminal image protocols
https://mierak.github.io/rmpc/
BSD 3-Clause "New" or "Revised" License
138 stars 8 forks source link

Covers rendering ontop of other tmux windows when unfocused #93

Closed teaperr closed 1 month ago

teaperr commented 1 month ago

Expected Behavior

Rendered covers to be not visible when rmpc is on an unfocused tmux window

Actual Behavior

When rmpc is open in another window in tmux and the song changes, the cover will be rendered on top of the current tmux pane until the current rmpc instance is quit.

Steps to reproduce:

  1. Open two tmux windows.
  2. Run rmpc in one of them.
  3. Play music.
  4. Move to the other window.
  5. run "rmpc next".

Specifications

Version: rmpc 0.4.0
Platform: Nixos Unstable
Additional info: 
    Terminal: Alacritty 0.13.2

Screenshots:

image

mierak commented 1 month ago

Right, this happens because ueberzugpp runs in a separate process and rmpc does not detect that it is not in an active tmux pane. I will see if I can somehow detect that. Anyway, this should really only happen in terminals not supported by other protocols like kitty.

mierak commented 1 month ago

There is also related issue https://github.com/jstkdng/ueberzugpp/issues/213 and pull request https://github.com/jstkdng/ueberzugpp/pull/215 on ueberzugpp side which could resolve this issue.

mierak commented 1 month ago

Fixed by https://github.com/mierak/rmpc/pull/95 Unfortunately the fix is not perfect. When you repeat your steps to reproduce and then switch back to rmpc, the album art will be the same as when you have moved to the other window. Simply switching to another tab in rmpc and back will refresh it though.

I will eventually improve on this, but this should make it at least usable.

teaperr commented 1 month ago

great, thanks a lot!