b4skyx / dotfiles

My personal linux dotfiles
419 stars 30 forks source link

Ncmpcpp and the Polybar module #3

Closed jonkke8 closed 2 years ago

jonkke8 commented 2 years ago

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.

b4skyx commented 2 years ago

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

jonkke8 commented 2 years ago

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

b4skyx commented 2 years ago

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

jonkke8 commented 2 years ago

Still didn't seem to work though.

b4skyx commented 2 years ago

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.

jonkke8 commented 2 years ago

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

b4skyx commented 2 years ago

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.

jonkke8 commented 2 years ago

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.

b4skyx commented 2 years ago

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.

jonkke8 commented 2 years ago

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

b4skyx commented 2 years ago

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.

jonkke8 commented 2 years ago

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