Welcome to my blog post focusing on my most recent effort—a wallpaper changing software that I spent over 12 hours creating!
This is not your average wallpaper changer program. Instead, it accesses high-quality photographs via the Unsplash API and allows users to define which categories of photos they wish to see.
I’ve combined the program with wget to get photos from the Internet and Nitrogen to install fresh wallpapers on the user’s desktop.
Compatibility and Auto-Start Function
📖 Supported Distributions
Tested and working on:
- Fedora
- Ubuntu
- Arch Linux
📖 Desktop Environments
- GNOME
- KDE
- i3 window manager
- Other major desktop environments
The auto-start feature allows the program to activate automatically upon system launch, so you can enjoy new and gorgeous backgrounds every day without having to open the program each time.
Automatic Installation
The wallpaper changing program provides an automated installation function for wget and nitrogen. If these two packages are not currently present on your system, the program will identify and utilize your Linux distribution’s package manager to install them.
pkexec apt install nitrogen wget -y
pkexec pacman -Sy nitrogen wget -y
pkexec dnf update --refresh -y
The program executes these installation commands via pkexec. If you’re using a window manager or similar basic configuration, you may need to make sure polkit is running.
Storage Management
📖 How Storage Works
One of the app’s best features is that it destroys duplicate photographs if Unsplash delivers them. Users can also choose their display resolution and the amount of disk space they wish to set up for photo downloads.
If the provided storage space fills up (default 9GB), the program will automatically erase older photographs to create place for new ones.
# Set the maximum size of the directory in GB
max_size_gb=9
Configuration Options
📖 Monitor Resolution
# Set the monitor resolution
monitor_resolution="1920x1080"
To find your resolution, run:
xrand
📖 Change Timer
# Wallpaper change interval (default: 30 seconds)
change_timer="30s"
1 minute = 60s, 2 minutes = 120s
📖 Photo Categories
You can customize which categories of photos to download:
queries=(
"quran"
"nature"
"technology"
"travel"
"islamic"
"mosques"
"Linux"
)
Dependencies
- polkit - For authentication (usually pre-installed on GNOME, KDE, XFCE)
- nitrogen - For setting wallpapers
- wget - For downloading images
If not installed, the script will auto-install these dependencies.
Uninstallation
# Remove the service
sudo rm -f ~/.local/bin/unsplash_krafi_wallpaper_generator
sudo rm -f ~/.config/autostart/unsplash_krafi_wallpaper_generator.desktop
# Remove downloaded photos
sudo rm -rf ~/Pictures/Wallpapers@krafi.info/
Conclusion
Why not give it a shot? Put it on your computer, then sit back and let the software refresh your desktop every day with gorgeous, high-quality photographs!
Thank you for using!
Discussion
0 commentsJoin the Discussion
Sign in to post comments and join the conversation.
No comments yet. Be the first to share your thoughts!