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

Music block fails to hide when player closes #1661

Closed
Deedasmi opened this issue Nov 9, 2022 · 5 comments
Closed

Music block fails to hide when player closes #1661

Deedasmi opened this issue Nov 9, 2022 · 5 comments

Comments

@Deedasmi
Copy link

Deedasmi commented Nov 9, 2022

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.

@MaxVerevkin
Copy link
Collaborator

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).

@ammgws
Copy link
Collaborator

ammgws commented Nov 10, 2022

$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
Copy link
Collaborator

ammgws commented Nov 10, 2022

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.

@MaxVerevkin
Copy link
Collaborator

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

@ammgws
Copy link
Collaborator

ammgws commented Nov 14, 2022

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

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

No branches or pull requests

3 participants