Script that will download 15 images from unsplash collection.
This is a help script so we can automatically change background-image on desktop / login screen and i3lock.
The downloaded images will be converted to PNG so i3lock will work.
New images only be downloaded if tempfolders modified date is older then 2 days
- imagemagick ( to convert jpeg to png for i3lock)
- feh
Folder structure
~/.splashr
├── bg - JPEG images
├── i3lock - Converted to PNG
└── temp - Download Folder
For lightdm or other loginmanager
Create folder and file
sudo mkdir /usr/share/images/login/
sudo chown username:username /usr/share/images/login/
touch /usr/share/images/login/login.jpeg
Set /usr/share/images/login/login.jpeg
as background-image in config for your loginmanger.
Make script executable
chmod +x splashr.sh
Run script
~/path/to/splashr/splashr.sh
i3config, set random background image when session starts. ~/config/i3/config
exec --no-startup-id feh --bg-scale $(find $HOME/.splashr/bg -name "*.jpeg" | shuf -n1)
Create a cronjob to run splashr.sh
. Background image will be change eachtime script runs. ( Every hour )
0 * * * * /path/to/splashr/splashr.sh
bindsym $mod+l exec i3lock -i $(find $HOME/.splashr/i3lock -name "*.png" | shuf -n1)
/usr/share/images/login/login.jpeg
will be updated if modified date is older then 1 day.