This script leverages Pywal and OpenRGB to sync the lighting of your devices (RAM, keyboard, mouse, fans, etc) to your wallpaper. See https://imgur.com/a/3Vq5SpJ for examples!
To use this script, you need to have OpenRGB (https://gitlab.com/CalcProgrammer1/OpenRGB) installed and running in server mode. Refer to the OpenRGB wiki for setup instructions as and for a list of supported devices.
openrgb --server --startminimized
Next, install https://github.com/dylanaraps/pywal which generates a colour palette from your wallpaper (this palette data is stored then in .cache/wal/colors.json and used by wal.js when configuring your RGB devices).
Finally, download run-wal.sh, package.json, and wal.ts to some location, which is from here on referred to as /some/path/here/rgb-controller/
. You will need to transpile the included wal.ts file (TypeScript) to wal.js (JavaScript), which is usually done by running npm install && tsc wal.ts
. You only need to do this once, but the initial setup may be tricky for those who are unfamilar with running JavaScript files. See https://www.typescriptlang.org/download to learn more.
Once wal.js exists; run the following to set a random wallpaper and then set all supported RGB components to a matching background colour: (You can just re-run this command above every time you want to rotate you wallpaper)
wal -i <path-to-wallpaper-folder> --saturate 0.7 -o /some/path/here/rgb-controller/run-wal.sh
That's it! Your devices should be synced to your wallpaper!