Something went wrong. Try again.
🌈️ apply a wallpaper based on the weather outside
Something went wrong. Try again.
TypeScript 92%
Shell 8%
README.md
rainwall #

rainwall is a program to set your wallpaper based on the weather outside.
dependencies #
usage #
- Give both
rainwall-analyzeandrainwall-applyan initial run to generate the config files, then edit the config files as needed. See below for configuration options.- Linux:
$XDG_CONFIG_HOME/rainwallor~/.config/rainwall - Darwin (macOS/OSX):
~/Library/Preferences/rainwall - Windows:
%LocalAppData%/rainwall
- Linux:
- Run
rainwall-analyzeto generate the index of image colours. This will take a while, be patient! - Run
rainwall-applyto set your wallpaper! Enjoy!
configuring #
analyze-config.json #
| option | typeof | default | description |
|---|---|---|---|
imageDir |
string |
/home/<yourusername>/Pictures |
The directory where your image files are stored. |
preAnalysisCommands |
string[] |
[] |
An array of commands to perform before analysis begins. Examples include applying CLUTs, adjusting HSV, etc. All commands will be properly escaped. Warning: commands are run directly with eval! Don't put anything potentially unsafe... or do, we don't care. |
apply-config.json #
| option | typeof | default | description |
|---|---|---|---|
latitude |
number |
0 |
The latitude used to discover the weather outside. |
longitude |
number |
0 |
The longitude used to discover the weather outside. |
weatherModel |
string |
"best_match" |
The weather model to calculate cloud cover and shortwave radiation with. Find the options on the Open-Meteo site. |
lightnessRange |
{ start: number; end: number } |
{ start: 0; end: 1 } |
The range of lightness values to map shortwave radiation to. Use this if your images are all exceptionally light or dark, due to post-processing or other reasons. |
chromaRange |
{ start: number; end: number } |
{ start: 0; end: 1 } |
The range of chroma values to map cloud cover to. Use this if your images are all exceptionally saturated or desaturated, due to post-processing or other reasons. |
applyWallpaperCommand |
string |
hyprctl hyprpaper wallpaper , %s |
The command used to apply the wallpaper. See "applying the wallpaper" section below for more info. |
applying the wallpaper #
Put %s where the image path would normally go.
Linux #
- GNOME (untested):
- Light theme:
gsettings set org.gnome.desktop.background picture-uri file://%s - Dark theme:
gsettings set org.gnome.desktop.background picture-uri-dark file://%s
- Light theme:
- KDE Plasma (untested):
plasma-apply-wallpaperimage %s
- awww (untested)
awww img %s
- swaybg (untested)
swaybg -i %s
- hyprpaper
hyprctl hyprpaper wallpaper , %s
Darwin (macOS/OSX) #
(untested, source)
Launch Automator. Click New Document → Choose. From the "Files & Folders" library, drag and drop the "Set the Desktop Picture" action to the right onto the larger workflow window. Save it somewhere accessible. Then, put this into the config file:
automator -i "%s" /path/to/your.workflow
Windows #
...who knows?
compatibility #
- Linux ✅
- Darwin (macOS/OSX) ❓
- Windows ❌