Playerctl - MPD - i3wm

So I have a keyboard with media keys and I also have a little script setup to control MPD viat playerctl from the keyboard.

This works perfectly in Openbox but refuses to work in i3, neither the keyboard buttons or the script work

Can someone help me to get this to work please. I have had it working in the past and just yesterday it no longer worked. I had made a huge number of changes to my i3 config so I am wondering if I have removed something?

When I run playerctl pause from the terminal I get:

connection to player failed: no players found

I use MPD with ncmpcpp. This is my i3 config.

Any help would be appreciated.

Weird, after never having to install mpd-mpris before I have had to to get the media buttons to work…

https://wiki.archlinux.org/index.php/Music_Player_Daemon/Tips_and_tricks#MPRIS2_Support

Still can’t get the script to work but that is no biggie.

You do have playerctl and the mpdclient correct installed right?

Indeed I do.

This is my script I am using that ties in with dmenu/rofi

https://p.teknik.io/pVGWC

I found the issue. The script didn’t like the icons I added being in there. Removing them solved my issue.

Damn it looked so good with those icons too.