i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Music block fails to hide when player closes

Open Deedasmi opened this issue 3 years ago • 5 comments

OS - Arch WM - i3 4.21.1 i3status-rs - Git (via AUR) Player - firefox (twitch)

Block config:

[[block]]
block = "music"
hide_when_empty = true
format = " $icon $combo $play $next"

Hides correctly when no player

With player:

image

Ctrl+w firefox tab to close player:

image

Happens with just $title as well.

Deedasmi avatar Nov 09 '22 20:11 Deedasmi

Can you share the debug messages? It should list available players. To enable them, run with RUST_LOG=music=debug env variable (e.g. RUST_LOG=music=debug cargo r >/dev/null).

MaxVerevkin avatar Nov 10 '22 05:11 MaxVerevkin

$combo and $title are fallible so you need to use | with them, right? The default format string for the music block already handles that IIRC

ammgws avatar Nov 10 '22 09:11 ammgws

The music block docs say "Note: All placeholders can be absent. See the examples below to learn how to handle this." but the examples aren't very obvious unless you are already familiar with the formatter.

ammgws avatar Nov 10 '22 12:11 ammgws

Do we even need hide_when_empty? I think it only confuses people.

MaxVerevkin avatar Nov 10 '22 13:11 MaxVerevkin

I guess not needed after #1618 , just need to give an example format string that replicates the behaviour

ammgws avatar Nov 14 '22 09:11 ammgws