Created
March 31, 2019 06:41
-
-
Save igtm/43d4dd9a99cb17ce6f70ed9e07eb2491 to your computer and use it in GitHub Desktop.
Auto refreshing Desktop Pictures for Mac. picking them up from Google search results.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# refreshes Desktop Pictures in Mac picking them up from Google search results. | |
# | |
# How to achieve: | |
# 1. Download dependent packages | |
# - you should first install googliser.sh | |
# see https://github.com/teracow/googliser | |
# | |
# 2. Donload this file | |
# 3. Create a directory and Modify this file | |
# - create a directory for putting wall pictures. | |
# - change WALL_PAPER_DIR to it | |
# | |
# 4. Set up Desktop Picture Settings for using the WALL_PAPER_DIR | |
# - see https://support.apple.com/ja-jp/HT207703 | |
# | |
# 5. Set crontab | |
# ex) 0 * * * * refresh-wallpaper.sh "cat cute" | |
# | |
# Done! | |
WALL_PAPER_DIR=/path/to/your/wallpaperdir | |
cd $WALL_PAPER_DIR | |
# download images | |
googliser.sh -p "${1}" -f0 -SC -n10 -m20mp --type face -o output --no-gallery | |
# delele old images | |
find . -type f -maxdepth 1 | grep googl* | xargs rm | |
# clean | |
mv output/* . | |
rm -rf output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment