Created
January 13, 2016 21:05
-
-
Save ceafin/fc6018b3faaf0dcf88ad to your computer and use it in GitHub Desktop.
I wanted to pull down the Spanish and English daily comic of Calvin and Hobbes from GoComics.com. This tiny script will pull down the GIF images, use ImageMagick to stack them, and then set the new graphic as the background wallpaper. I use gsettings for the Cinnamon DE for setting the background.
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/bash | |
# Script to pull comic and set as background each morning/login. | |
GRABES=`curl -s http://www.gocomics.com/espanol/calvinandhobbesespanol | grep -oP "http://assets\.amuniversal[^\"]*\" width=\"600\"" | awk -F\" '{print $1}'` | |
GRABEN=`curl -s http://www.gocomics.com/calvinandhobbes | grep -oP "http://assets\.amuniversal[^\"]*\" width=\"600\"" | awk -F\" '{print $1}'` | |
wget -O /home/<USER>/Pictures/newComicBGes.gif $GRABES | |
wget -O /home/<USER>/Pictures/newComicBGen.gif $GRABEN | |
convert /home/<USER>/Pictures/newComicBGes.gif /home/<USER>/Pictures/newComicBGen.gif -append /home/<USER>/Pictures/newComicBG.gif | |
gsettings set org.cinnamon.desktop.background color-shading-type 'solid' && gsettings set org.cinnamon.desktop.background picture-opacity 100 && gsettings set org.cinnamon.desktop.background picture-options 'centered' && gsettings set org.cinnamon.desktop.background primary-color '#000000' && gsettings set org.cinnamon.desktop.background secondary-color '#000000' && gsettings set org.cinnamon.desktop.background picture-uri 'file:///home/<USER>/Pictures/newComicBG.gif' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment