Friday, January 3, 2014

A little thing

I've been out of town for a couple days, so as soon as I got back I was desperate to build something. My wireless charger for my new Nexus 5 happened to be here, so on a whim I looked to see if Tasker was capable of telling if this was the case. Sure enough, Tasker can detect the charger flawlessly. So what to do with it...

I decided opening the desk clock was a little boring. I also noticed Tasker had a whole bunch of image manipulation methods and also an HTTP Get method. So I threw together some Ruby to scrape Flickr for a random image and pushed it to Heroku.

It seems that you can no longer easily export Tasker profiles, or else I would post it here. But it is pretty simple:
  1. Add a new Profile for Event > Power and set it to Wireless (or Any if you prefer)
  2. Create a new Task:
    1. Turn on Night Mode
    2. Set Variable %FLICKRIMG to Download/flickr.img (a static name will replace old images to save space)
    3. HTTP Get
      Server: random-flickr-image.herokuapp.com
      Output File: %FLICKRIMG
    4. Set Wallpaper to %FLICKRIMG
  3. Also create an Exit Task to turn Night Mode back off and set the wallpaper back to normal (or don't, and have a new wallpaper for the day!)
Here's a video of it in action. For a 3 hour project, I'm pretty excited.

No comments:

Post a Comment