1. Zamroni1's Avatar
    Do you like the Spotlight wallpapers in your Windows 10 lock screen? I do. However, Microsoft doesn't give option to make Spotlight as regular desktop background. Well, the Spotlight's JPEG images are stored within your %LOCALAPPDATA% directory, so some script can process them to make it as usable desktop background images.

    These are the steps:
    1. Enable Spotlight in "Settings > Personalization > Lock Screen". Choose Windows Spotlight in Background drop down.

    2. The Spotlight images consists of portrait and landscape images. Surely, only landscape images are suitable for desktop wallpaper, so the script checks the image resolution to determine the orientation. I use Linux's file command to check the resolution program because no such Windows equivalent exists. So, enable Windows Subsystem for Linux in "Control Panel > All Control Panel Items > Programs and Features > Turn Windows features on or off, then:
    a. Restart your computer if Windows ask for it.
    b. After restart, open newly created shortcut of Bash on Ubuntu on Windows. This will completely download and install required components.

    3. Define and make your working directory. I use "c:\temp\spotlight". The following procedures are written according to the path of working directory and my Spotlight folder, i.e. C:\Users\mazam\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets.

    4. Create "spotlight.sh" text file containing text below. Use Unix-friendly text editor, e.g. WordPad, and not Notepad.
    ls -1 /mnt/c/Users/mazam/AppData/Local/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets/ | sort > /mnt/c/temp/spotlight/listsource.txt
    ls -1 /mnt/c/temp/spotlight/*.jpg | awk -F "/" '{gsub(".jpg","",$6);print $6}' | sort > /mnt/c/temp/spotlight/listtarget.txt
    egrep -vf /mnt/c/temp/spotlight/listsource.txt /mnt/c/temp/spotlight/listtarget.txt | awk '{system ("rm -f "$1".jpg")}'
    for i in `cat /mnt/c/temp/spotlight/listsource.txt | egrep -vf /mnt/c/temp/spotlight/listtarget.txt`
    do
    varfile=/mnt/c/Users/mazam/AppData/Local/Packages/Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy/LocalState/Assets/"$i"
    file $varfile | grep JPEG | awk -F, '{gsub(" ","",$8);print $8}' | awk -Fx -v vfile=$i -v vfilefull=$varfile '{if ($1>$2 && $1>1280) system("cp "vfilefull" /mnt/c/temp/spotlight/"vfile".jpg")}'
    done

    5. (Optional) Test the script in Bash on Ubuntu on Windows. Execute /mnt/c/temp/spotlight/spotlight.sh. Check that JPEG files are created in c:\temp\spotlight.

    6. Change Desktop background to Slideshow in Settings > Personalization > Background. Select your working directory as the album directory.

    7. Because Spotlight images are changed automatically, we also want also desktop to follow accordingly. So, create startup mechanism to automatically update the images working directory. Create spotlight.bat text file in working directory containing text:
    bash -c "/mnt/c/temp/spotlight/spotlight.sh"

    8. Right click the spotlight.bat file then select Create Shortcut.

    9. Move the resulted shortcut to your Startup folder. For me, it is "C:\Users\mazam\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup". File spotlight.bat will be executed every time you do new login to Windows.

    10. DONE
    05-25-2017 06:45 AM
  2. s2339352's Avatar
    It fails to run for me. Is it because I do not have the listsource.txt and listsource.txt files?
    12-06-2017 10:34 AM

Similar Threads

  1. Surface Pro 4 going to Sleep instead of Shutdown
    By john_rs in forum Microsoft Surface Pro 4
    Replies: 2
    Last Post: 05-28-2017, 06:34 PM
  2. Windows 8.1
    By abbey adewale in forum Ask a Question
    Replies: 1
    Last Post: 05-25-2017, 07:12 AM
  3. Gwent hits open beta and invites everyone to play
    By WindowsCentral.com in forum Windows Central News Discussion
    Replies: 0
    Last Post: 05-25-2017, 06:10 AM
  4. How to change Windows Defender Antivirus cloud-protection level on Windows 10
    By WindowsCentral.com in forum Windows Central News Discussion
    Replies: 0
    Last Post: 05-25-2017, 06:10 AM
  5. Excellent Windows Phone Video!
    By RJ Priest in forum General Phone Discussion
    Replies: 1
    Last Post: 05-24-2017, 10:22 PM
LINK TO POST COPIED TO CLIPBOARD