{"id":266,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=266"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"shuffle-your-background-images","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=266","title":{"rendered":"Shuffle your background images"},"content":{"rendered":"<p>Want a cool way to shuffle your backgrounds everytime you restart? Well look no further. This handy dandy little script seems to work great. What you need to do is point the Backgrounds preferences panel at a particular image, then use this script to suck a random image out of another directory and overwrite the image Backgrounds is pointing to every time you reboot.<br \/>\nFirst make a copy of one of your backgrounds and call it something like &#8222;background.jpg&#8220;. Put it in a directory where you can pretty much ignore it, like &#8222;<code>\/boot\/home\/config\/settings<\/code>&#8222;.<br \/>\nNow you need to set your background in the preferences to &#8222;<code>\/boot\/ home\/config\/settings\/background.jpg<\/code>&#8222;.<br \/>\nNext, drop all the backgrounds you want to appear in rotation into a single directory. This script assumes that location is <code>\/boot\/home\/Backgrounds<\/code>.<br \/>\nOk, now the easy part, edit your &#8222;userBootscript&#8220; file and add the following code:<\/p>\n<pre>\n\tN=`date +%S`\n\tN=`expr $N + 0`\n\tI=0\n\tfor file in \/boot\/home\/Media\/Backgrounds\/*\n\tdo\n\t\tI=$[$I + 1]\n\tdone\n\tN=$[($I * $N) \/ 60]\n\tfor file in \/boot\/home\/Media\/Backgrounds\/*\n\tdo\n\t\tif [ $N -eq 0 ]\n\t\tthen\n\t\t\tcp $file \/boot\/home\/config\/settings\/background.jpg\n\t\t\tbreak\n\t\tfi\n\t\tif [ $N -ne 0 ]\n\t\tthen\n\t\t\tN=$[$N - 1]\n\t\tfi\n\tdone\n<\/pre>\n<p>You will need to change &#8222;<code>\/boot\/home\/Media\/Backgrounds<\/code>&#8220; to your background folder, and then after you restart twice, you&#8217;ll be all set.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want a cool way to shuffle your backgrounds everytime you restart? Well look no further. This handy dandy little script seems to work great. What you need to do is point the Backgrounds preferences panel at a particular image, then use this script to suck a random image out of another directory and overwrite the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[10],"class_list":["post-266","post","type-post","status-publish","format-standard","hentry","tag-scripting"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/266\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}