Skip to content
This repository has been archived by the owner on Sep 7, 2019. It is now read-only.

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Mar 9, 2017
1 parent 03e6f9f commit 8cb920e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Unsplash Wallpapers
Changes your wallpaper every sixty seconds to a fresh one from Unsplash.

## Installation
Download the zip file and extract it somewhere where you won't delete it. Create a shortcut of the `UnsplashWallpapers.exe` by right-clicking it and pressing "Create shortcut". Then press <kbd>Win</kbd> + <kbd>R</kbd>, enter `shell:startup` and drag & drop the shortcut into it. This way, Unsplash Wallpapers will start everytime you boot your machine.

## Source code
The .exe file is just a compiled batch file that runs in the background. The source code can be found at `UnsplashWallpapers.bat`.

## Dependencies
Only `wget`, which is included in the zip file.
Binary file added SetWallpaper.ps1
Binary file not shown.
18 changes: 18 additions & 0 deletions UnsplashWallpapers.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@echo off
title Unsplash Wallpapers

:start

REM Get screen resolution
FOR /f "tokens=1,2" %%a IN ('"wmic desktopmonitor get screenheight, screenwidth"') DO (
SET /a ScreenHeight=%%a
SET /a ScreenWidth=%%b
)

REM Download image and set it as wallpaper
wget.exe https://unsplash.it/%ScreenWidth%/%ScreenHeight%?random -O %USERPROFILE%/Pictures/Unsplash.jpg --no-check-certificate
Powershell.exe -executionpolicy remotesigned -File SetWallpaper.ps1

REM Wait for 60s
ping 127.0.0.1 -n 60 > nul
goto start
Binary file added UnsplashWallpapers.exe
Binary file not shown.
Binary file added wget.exe
Binary file not shown.

0 comments on commit 8cb920e

Please sign in to comment.