Created
September 26, 2018 02:25
-
-
Save youthlin/bdf3f9751dc5c554031048b383157687 to your computer and use it in GitHub Desktop.
BingWallpaper-xfce4
This file contains hidden or 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 | |
#by youthlin.chen https://youthlin.com | |
dir=`pwd` | |
file=`curl -I "https://cn.bing.com/ImageResolution.aspx?w=1920&h=1080" 2>/dev/null | grep Location | awk '{print $2}'` | |
file=${file%_*} | |
file="${file}_1920x1080.jpg" | |
url="https://cn.bing.com$file" | |
file=${file##*/} | |
today=`date +%Y%m%d` | |
file="${today}_${file}" | |
curl $url >$file 2>/dev/null | |
/usr/bin/xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitor0/workspace0/last-image -s $dir/$file | |
/usr/bin/xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitor1/workspace0/last-image -s $dir/$file | |
notify-send -i $dir/bing-logo.png '壁纸已设置' $dir/$file | |
#bing-logo.png: http://pluspng.com/img-png/logo-bing-png-bing-icon-1600.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
save as
~/Pictures/bing/bing.sh