A Windows application that automatically changes your desktop wallpaper by fetching images from Reddit subreddits. The application includes a 24-hour timer to prevent excessive downloads and comes with a complete Windows installer.
- ๐ผ๏ธ Automatically fetches wallpapers from Reddit (default: r/wallpaper)
- โฐ 24-hour cooldown period between wallpaper changes
- ๐ Handles PC shutdowns/restarts properly (tracks time since last change)
- ๐ฅ Downloads images to
Pictures/redpaper_wallpapers/ - ๐ช Native Windows desktop wallpaper integration
- ๐ Scheduled task for automatic operation
- ๐ ๏ธ Complete Windows installer with uninstaller
The application stores a timestamp of the last successful wallpaper change in %APPDATA%\RedPaper\last_run.txt. On each run, it:
- Checks if 24 hours have passed since the last change
- If yes: Downloads a new wallpaper from Reddit and sets it
- If no: Logs the remaining time and exits gracefully
This ensures you get fresh wallpapers regularly without overwhelming the Reddit servers or your bandwidth.
- Go 1.19 or later
- Windows 7 or later (for the compiled application)
- NSIS (optional, for creating the installer)
-
Clone or download this repository
-
Build the application:
.\build.bat
This will:
- Compile the Go application for Windows
- Create a Windows installer (if NSIS is installed)
- Generate a ZIP package with all files
The generated files will be:
build\redpaper.exe(Standalone executable)build\RedPaper_Installer.exe(Windows installer)build\RedPaper_v1.0.0.zip(ZIP package)
- Run
RedPaper_Installer.exe - Follow the installation wizard
- The installer will:
- Install the application to Program Files
- Create a scheduled task to run every hour
- Add an entry to Add/Remove Programs
- Create a desktop shortcut
- Run
install.batas administrator - This will install the application and set up the scheduled task
- Just run
redpaper.exedirectly - No installation required, but you'll need to run it manually
Once installed with the installer or batch script, the application will:
- Run every hour via Windows Task Scheduler
- Check if 24 hours have passed since last wallpaper change
- Download and set new wallpaper only when needed
redpaper.exeThe application will log its actions to the console and exit with appropriate status codes.
Edit the main.go file and change the subreddit parameter in the main() function:
changer := NewRedPaper("your_subreddit")The application fetches "top" posts from the past day by default. You can modify this in the Run() method:
wallpaperData, err := rwc.GetTopWallpaper("week", 10) // Change "day" to "week", "month", etc.- Application:
%PROGRAMFILES%\RedPaper\ - User Data:
%APPDATA%\RedPaper\ - Wallpapers:
%USERPROFILE%\Pictures\redpaper_wallpapers\ - Logs:
%PROGRAMFILES%\RedPaper\logs\
- Search for "RedPaper"
- Click Uninstall
- Run
uninstall.batas administrator - Choose whether to keep your downloaded wallpapers
- Ensure you're running as administrator (for installation)
- Check Windows Event Viewer for error details
- Open Task Scheduler (
taskschd.msc) - Look for "RedPaper" task
- Check the task's history for errors
- Check the log file:
%PROGRAMFILES%\RedPaper\logs\redpaper.log - Ensure internet connection is available
- Verify the subreddit exists and has images
- Ensure Go is installed and in your PATH
- For installer creation, install NSIS from https://nsis.sourceforge.io/
This project is provided as-is for personal use. See license.txt for details.
- Written in Go for cross-platform compatibility
- Uses Windows API for native wallpaper setting
- Implements proper error handling and logging
- Scheduled tasks run with user privileges
- Stores timestamps in Unix format for reliability
