Giter VIP home page Giter VIP logo

change_wallpaper's Introduction

alt text

change_wallpaper

So, I woke up this morning and I looked at my Mac's wallpaper thinking that it's been there for a while and I needed to change it... Therefore I headed over to Unsplash... Where I spent over 30 minutes just looking for a wallpaper. Needless to tell you that I didn't find any that suit me. I decided to code a simple script that would go there, and pick a randmon wallpaper for me and set it on my desktop. Now this script runs anytime I start my laptop and I start my day with a new, fresh wallpaper ๐Ÿ˜Œ.

This is a simple script that allows you to change your wallpaper from the terminal using bash & osascript thanks to the amazing pictures gotten from the Unsplash API.

First get your own unsplash API key:

Click here to get an Unsplash API key

Once you have your API key, head over to the key.sh file in order to add it and you can now call the script to change your Wallpaper. sh change_wallpaper

In the script change_wallpaper.sh, here is the syntax of the change_wallpaper function:

change_wallpaper <theme> <size>

<theme> is used as the query parameter (if you want images of planes, nature, etc...).

<size> is the different sizes allowed by the unsplash API:

  • raw -> full size images (~18 Mb)
  • full -> full size (~5 Mb)
  • regular -> medium size (~1 Mb)
  • small -> small size (~300 Kb)
  • thumb -> thumbnail (~100 Kb)

Feel free to fork it and edit as you wish. Come talk to me on Twitter @boulama_k

change_wallpaper's People

Contributors

boulama avatar

Stargazers

Farouk Sabiou avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.