That is cool. I wanted to do something just like this but failed at the crucial step of actually doing it… so kudos to you! I like the idea of holding the button for longer to initiate a safe shutdown - that is neat. Have you considered suggesting they add this support to the https://github.com/pimoroni/mopidy-raspberry-gpio project?
Your instruction in the readme:
sudo apt-get install mpd-mopidy mpc -y
is wrong as there’s no such package as
mpd-mopidy. It should read:
sudo apt-get install mopidy-mpd mpc -y
(it’s already correct in your script).
You’ve got some typos in each of the occurrences of Pimoroni in the readme. And also note that the Raspberry Pi Foundation are very protective of their logo, you might have noticed you don’t see it used outside of their official stuff. If they see it they will, not unreasonably, ask you to remove it.
If you find your work to be used in my project and want a shout out, feel free to contact me.
Can Mopidy itself have a shout out?
EDIT: Are you working on a case or anything? Your README would be even better with some pictures!