Luxafor <-> Spotify integration
This set of scripts will change your Luxafor light's colors based on your Spotify player's state. It polls every 10 seconds for Spotify's play state and changes the color accordingly (playing -> red, not playing -> green).
The script will record what color it set on the last run and will not set it again if it does not change. This way you can manually override the setting and the script won't fight you before changing play states again.
- Checkout the files (I've used
- Copy the
~/binand make sure it's executable. Make sure it points to an existing
nodeexecutable and where you copied the gist repo.
- Open the
.scptfile with AppleScript editor and make sure it points to the
- Make sure the
.plistpoints to where your Apple script file is located. You can change the poll interval (default 10s) by changing the
- Link the
- Start it by running
launchctl load -w ~/Library/LaunchAgents/fi.mumakil.luxafor_spotify.plist