Skip to content

kanyesthaker/syncavify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

syncavify

Sync Cava colors to Spotify album art. I made this in about 3 hours, learning all my Rust from the Rust book and ChatGPT. The script grabs the album art for the currently playing song (the mechanism for this is OS-dependent) and then uses PNGQuant to quantize the image to 3 colors. These 3 colors are then used to recolor the visualizer.

For All Users

This project changes colors for the Cava Terminal visualizer. Instructions for installing Cava are available on the project's GitHub.

  1. Go to the .env.template file in this project and change it to .env. If you're using linux you can remove all lines in this file except for CAVA_CONFIG_LOCATION.
  2. Find your Cava config (by default ~/.config/cava/config) and modify the CAVA_CONFIG_LOCATION env var to point at the config (it should just be the default).
  3. Follow your OS-specific instructions below
  4. Use cargo run to run this program (you will need to run cava in a separate window, and have Spotify running for anything to happen. Will not open either automatically).

For Linux Users

Make sure you have playerctl installed. playerctl (repo) is a CLI tool that implements MPRIS and makes for faster and less resource-intensive polling for the album art.

For Non-Linux Users

Without a handy utility availble like playerctl, installation is a little more involved. There is some AppleScripts magic that you can use to automate this on OSX, but for now we can just auth with the Spotify client directly (even if it is a bit cumbersome). I use a Linux box, so I haven't spent too much time thinking about this flow. Might smooth this process out later.

  1. Grab a set of Spotify API credentials (either get them from me (Kanyes) or use your own).
  2. Put these API keys into your .env files under the appropriate environment variables
  3. When you run the program, you will be taken to your browser and asked to authenticate with Spotify. Once you do so, copy and paste the URL you are taken to (will be an error page) and paste it back into your terminal. As of right now there's no refresh-token persistence, so you'll have to do this copy-pasting every time you restart the app.
364181994_6665165726855968_7681131338876672575_n.mp4

About

Sync Cava colors to Spotify album art

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages