Gets random photos from Unsplash and sets them as the desktop background. Works on Debian operating systems select operating systems (e.g. Ubuntu, Linux Mint), at least for now.
In addition to having go installed to your system, you'll also need an Unsplash Developers Account
for you to get an unsplash access key to be used for API calls under the hood.
Proceed to Unsplash Developers and create an account.
After creating an account, create an app. You'll get the app's access key towards the bottom of the
created app's page.
$ go get -u github.com/eddogola/wallpapr/...
go: finding github.com/eddogola/wallpapr latest
...
go: finding github.com/eddogola/unsplash-go latest
go: finding golang.org/x/oauth2 latest
go: finding golang.org/x/net latestwallpapr is mostly used as a command line application, but can also be used as a package.
gets a random wallpaper from unsplash and sets it as the desktop background
Usage:
Wallpapr set-random [flags]
Flags:
-d, --destination string the directory where downloaded photos will be saved (default "<HOME>/wallpapers/")
-h, --help help for set-random
Example
$ wallpapr set-random
Downloading https://unsplash.com/photos/-4Px6AOOPkI/download...
Progress 412809 / 872782 bytes (47%)
Download saved to .//home/ogola/wallpapers/Tommy-Nguyen--4Px6AOOPkI-unsplash.jpg
2021/04/15 /home/ogola/wallpapers/Tommy-Nguyen--4Px6AOOPkI-unsplash.jpg set as wallpaper- Unsplash-go - Unsplash API Client
- Grab - Download manager
- Readenv - For reading .env files
- Homedir - For getting home directory
Please feel free to PR, point issues out, and implement more features(like adding support for more platforms)
This CLI app is not yet mature. It can benefit from a lot of refactoring and test writing. Still learning 🌴