benji / bing-potd

~/scripts/bing-potd Commits Diff Raw
#!/bin/fish

set share ~/.local/share/benji
mkdir -p $share
set wall $share/wall.jpg

if test -e $wall
  mv $wall{,.prev}
end
curl (curl -s 'https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1' | sed 's/.*"urlbase":"\([^"]*\)".*/https:\/\/www.bing.com\1_1920x1080.jpg/') > $wall
if test -e $wall
  feh --bg-fill $wall
end