d093w1z / polybar-now-playing

Script for polybar to display and control media(not only Spotify) using DBus.
70 stars 10 forks source link

How to hide when there is no player open? #5

Closed gianmarcogg03 closed 3 years ago

gianmarcogg03 commented 3 years ago

I don't know much Python, sorry if this question sounds dumb or something.

d093w1z commented 3 years ago

You could change the value it prints to an empty string on line 129 of python script as follows. tmp_message = "" Hope it helps!

gianmarcogg03 commented 3 years ago

I tried but it just keeps showing the whole thing (prefix, empty message, player controls and suffix).

d093w1z commented 3 years ago

I'll add a check for it. Wait for the commit.

d093w1z commented 3 years ago

https://github.com/d093w1z/polybar-now-playing/commit/c7966f3564b2f7d160780918f314cbb2e1bca6b9 Done! Change the hide_output boolean value in the source to true to hide the player when no player is available.