Closed Dakkomii closed 1 year ago
Yes thats because mpd is not started or have a config error.
First open a terminal and do killall mpd
then start again mpd with mpd
See if there are errors.
then go to .config/mpd/mpd.conf and be sure your music directory is configured correctly, where you have your music files. Do the same with .config/ncmpcpp/config must be the same songs directory.
finally be sure you enable mpd to start when you start session.
systemctl --user enable mpd.service
systemctl --user start mpd.service
Thank you for the fast reply. So I tried that but I get this when I try to run mpd. I checked the conf file and the music directory is correct.
decoder: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
do you mind if i ask if the media controls are supposed to work with spotify too?
I think that error is because mpd is enabled system wide, not for user only, to be sure try sudo systemctl disable mpd.service
then enable and start again with
systemctl --user enable mpd.service
systemctl --user start mpd.service
reboot
now open a terminal and type again mpd
are you using pulseaudio? pipewire? alsa? my dotfiles config is for pipewire but if you have pipewire-pulse, is like having pulseaudio so still works.
Well now open a terminal and type ncmpcpp or if u are using my dots press shift + alt + k . check if says connected to 127.0.0.1 press key "u" to update database so if you have all fine, must work..
No polybar module is "mpc" based and doesnt work to change, pause, stop, play spotify music, but MediaControl in sxhkdrc works for mpc and spotify and other music players. if u have volume, mute, stop, play, next, previous buttoms on your keyboard, they must work for spotify, mpc and others.
PD: sorry my bad english
ohh and open ncmpcpp again and press "7" key and select pulse audio if not selected, you see a disabled, enables message when you press enter, let it in enabled.
No worries, am not that good at english either XD..
After the reboot this is what i get:
exception: Failed to bind to '127.0.0.1:6600'; Failed to bind socket: Address already in use
I am using pipewire. ncmpcpp shows connected connected to 127.0.0.1 but nothing happens when I type u. I pressed 7 and selected piperwired then updated database again but nothing. it is all just so weird. I think I will uninstall mpd and try to run the rice installer again just to see if that works. Will update you soon.
In order to get any kind of error, I don't think it's necessary to run my installer again, just uninstalls mpd, mpc and ncmpcc. and restart your pc. then install again mpd, mpc and ncmpcc. then activate the service
systemctl --user enable mpd.service
and reboot again.
now open a terminal and check if it connects well. and modify the settings to point to your music files folder
You don't need to use the installer again, because it doesn't really have to do with my dotfiles, it's just the mpd.
I remember the first time I installed it, I had exactly the same errors as you. In my case it was to activate the mpd service as normally is sudo systemctl enable mpd.service
but it has a trick, I could never make it work like this, I had to disable it, restart and activate it but only for the user with systemctl --user enable mpd.service
without sudo
The arch wiki itself tells you to do it only for the user, restarting is important because if it was already active globally, it will give you that error, adress already in use.
so I tried disabling the mpd service and then uninstalling and intalling mpd again making sure i enabled it only for the user and rebooting when necessary, but it did not work. To be honest I mostly use youtube and spotify so I ended up using a polybar module for spotify https://github.com/PrayagS/polybar-spotify . Its working great so I think we can close the ticket.
Thank you!
Here is how the bar looks now.
@Dakkomii can u tell me how to install polybar-spotify. i'm Stuckk >:(
Sure, here is what I did to get the module working:
[module/spotify]
type = custom/script
tail = true
interval = 1
; prefix symbol is shown before the text
format-prefix = " "
format = <label>
exec = ~/.config/bspwm/scripts/scroll_spotify_status.sh
[module/spotify-prev] type = custom/script exec = echo "%{T2} " format =
[module/spotify-play-pause] type = custom/ipc hook-0 = echo " %{T2} " hook-1 = echo " %{T2} " initial = 1 click-left = playerctl play-pause -p spotify
[module/spotify-next] type = custom/script exec = echo " %{T2}" format =
Here is an image in case you cant see some of the characters. I just copied the symbols used for mpd:
![ShoT_2023-04-04-02-48-36_6880x1440](https://user-images.githubusercontent.com/106775914/229891006-7b875422-de55-4dda-89d4-be18ce180b47.png)
4. Lastly, I modified modules-left in the config.ini file that is also located in .config/bspwm/rices/emilia/ and added the spotify module into polybar. Here is my my code.
modules-left = launcher dots bi cpu_bar bd sep bi memory_bar bd sep bi filesystem bd sep sep sep spotify sep spotify-prev spotify-play-pause spotify-next modules-center = bi bspwm bd modules-right = mpd sep bi network bd sep bi pulseaudio bd sep bi updates bd sep bi date bd
Dont know if there is a way to add the module to all rices but hope this helps ^-^
Thanks dude. I appreciate you <3
Sure, here is what I did to get the module working:
- cloned the get_spotify_status.sh and scroll_spotify_satus.sh from github to .config/bspwm/scripts/
- added the next code in the modules.ini file of the rice I wanted to use, in this case Emilia. Path is .config/bspwm/rices/emilia/
[module/spotify] type = custom/script tail = true interval = 1 ; prefix symbol is shown before the text format-prefix = " " format = <label> exec = ~/.config/bspwm/scripts/scroll_spotify_status.sh [module/spotify-prev] type = custom/script exec = echo "%{T2} " format = <label> click-left = playerctl previous -p spotify [module/spotify-play-pause] type = custom/ipc hook-0 = echo " %{T2} " hook-1 = echo " %{T2} " initial = 1 click-left = playerctl play-pause -p spotify [module/spotify-next] type = custom/script exec = echo " %{T2}" format = <label> click-left = playerctl next -p spotify
Here is an image in case you cant see some of the characters. I just copied the symbols used for mpd:
- Lastly, I modified modules-left in the config.ini file that is also located in .config/bspwm/rices/emilia/ and added the spotify module into polybar. Here is my my code.
modules-left = launcher dots bi cpu_bar bd sep bi memory_bar bd sep bi filesystem bd sep sep sep spotify sep spotify-prev spotify-play-pause spotify-next modules-center = bi bspwm bd modules-right = mpd sep bi network bd sep bi pulseaudio bd sep bi updates bd sep bi date bd
Dont know if there is a way to add the module to all rices but hope this helps ^-^
I only use spotify too so your recommendation fell like a glove, THANK YOU SO MUCH S2 I started following you on github :)
media controls on polybar are not working. any idea how to fix this? I did a freash install before I installed the dotfiles so I have not changed anything to them.
Please let me know if you need more info.