My shell script to pause Youtube videos and music system-wide with a mouse button
You have to put the pausemusic.sh in the /usr/bin/ directory and then execute the macroing.sh in the .xinit to be able to use this system-wide.
Edit the macroing.sh to change the button that triggers it.
Good luck mate.