Created
August 9, 2021 11:46
-
-
Save merrickluo/8785c4e8e062bdb70dbc9af939b8e03d to your computer and use it in GitHub Desktop.
bash script to fetch bingwallpaper
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
#!/usr/bin/env bash | |
resolution=3840 | |
api="https://bing.biturl.top/?resolution=$resolution" | |
store="$HOME/Pictures/Bing" | |
mkdir -p $store | |
img_url=`curl -s $api | jq -r .url` | |
img_name=${img_url##*=} | |
echo $img_url | |
echo $img_name | |
curl -s "$img_url" -o $store/$img_name | |
echo "Wallpaper saved to $store/$img_name" | |
rm $store/current | |
ln -s $store/$img_name $store/current |
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
* */6 * * * ~/.bin/binwall >> /dev/null 2>&1 |
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
i3lock -t -i ~/Pictures/Bing/current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment