b4skyx/dotfiles

Ncmpcpp and the Polybar module

Closed this issue · 12 comments

I have a problem (again) after switching to Arch. Polybar doesn't display the playing music in the top left corner like it used to, and playerctl commands do not work. I've gotten mpd and ncmpcpp configured via backups of my files from my earlier OS setup, so I don't think it would be anything from those.

Edit: Firefox seems to work though.

Can you play music via mpd/ncmpcpp?
From what I read, it could be an mpd issue instead of the polybar module one.

Yes, music plays absolutely fine and no errors in Ncmpcpp or mpd

I see. The polybar module depends on a python module named python-gobject. Make sure you have it installed on your system.
pacman -S python-gobject

Still didn't seem to work though.

Mpd by default does not supports mpris. I use this to get the mpris metadata from mpd. You can use any other interface as well.

I have mpDris2 installed already, I'm not sure if it's configured correctly though. Could you send over a config or something? Anything would be nice.

Edit: just to clarify why I'm not sure if it's configured correctly is because it worked out of the box when I was using my previous OS

It doesn't needs any configuration to work. If playerctl is showing no info, then the mpris is not working.

You can probably try some other app. This one works for me aswell.

It started working randomly after reinstalling mpd-mpris, but when I try to pause my music it starts resuming the youtube video I'm watching. Any way to make it so it only controls mpd?

Edit: ...And after a reboot it stopped working again.

Then perhaps you want a mpd polybar module instead of mpris. I use multiple players so I find mpris to be convenient to controll them all.

Polybar already has a mpd module. You can check it out and how to use it on their repo here.

Okay, I'll check it out, thanks!
Edit: How can I keep the look of the previous module? For example colors.

The documentation should list fields such as format-background. You can refer to it for any changes you wish to make. Alternatively if you can send the config, I can take a look and help you making it uniform with the rest of the bar.

I figured it out afterwards. I'll close this thread for now, except if I have anything else that I need help with.