PrayagS / polybar-spotify

:musical_note: Spotify status and controls module for Polybar with text scrolling
MIT License
581 stars 38 forks source link

Play/Pause button doesn't update the icon #26

Closed p0ryae closed 2 years ago

p0ryae commented 2 years ago

I have enable-ipc = true in my bar config - I expect the play button turn into the opposite when I'm clicking but it doesn't. It's always on 1 specific icon no matter what

PrayagS commented 2 years ago

Can you please post your scripts and polybar config?

https://github.com/PrayagS/polybar-spotify/blob/f8f492bc5619e661ef4cf90223887c2f19d8d5b7/get_spotify_status.sh#L4-L5

These are the lines in the script where you need to mention the name of the bar containing the modules. So make sure that the correct name is present in the script.

The script then fetches the PID of that bar and callsupdate_hooks to update the icons. You can also try to echo this and verify whether the correct PID is being fetched.

p0ryae commented 2 years ago

image

And when I run it in terminal: image

Pretty sure its catching it.

My polybar config: https://sourceb.in/n0WPjmomMC

PrayagS commented 2 years ago

Can you also try to call the update_hooks externally with the PID you showed?

https://github.com/PrayagS/polybar-spotify/blob/f8f492bc5619e661ef4cf90223887c2f19d8d5b7/get_spotify_status.sh#L19-L25

Just source this function and then try running the following in your shell.

update_hooks <pid> 1
update_hooks <pid> 2
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.