arkq / cmusfm

Last.fm standalone scrobbler for the cmus music player
GNU General Public License v3.0
235 stars 5 forks source link

status_display_program unusable because of cmusfm? #27

Closed Owlz closed 5 years ago

Owlz commented 5 years ago

I'm making yet another widget for my status bar and i'd like to show the current song playing + status of the song. To do such operation shoud set my "status_display_program" pointing to my script but, since i'm using cmusfm to scroble songs, the currently set status_display_program is cmus. Is there a way to both scroble and have a custom script running on status_display events?

Owlz commented 5 years ago

As i understand, the problem is not cmusfm but cmus itself. I have fixed it by using a simple bash script that intercept the messages from status_display_program and send them to cmusfm and my other custom scripts.

example.sh

#!/bin/bash

# propagate to the scrobler
cmusfm "$@"

# propagate it to i3blocks
pkill -SIGRTMIN+5 i3blocks

And on cmus: :set display_artist_sort_name=~/.config/userscripts/cmus_propagate.sh

Feel free to close this issue, sorry for bothering you