Code Monkey home page Code Monkey logo

weather-cal's Introduction

Weather Cal

This is a Scriptable widget that allows you to display, position, and format multiple elements, including the date, a greeting, your upcoming events, the current weather, and future weather. You can even create your own elements by writing a function that has a single WidgetStack as an argument (representing a column).

How to set it up

You'll need to make a couple edits to the weather-cal.js file before you start. You can edit on your computer and transfer to iOS, or just edit in Scriptable itself.

  1. Get a free OpenWeather API key. Paste the key into apiKey = "" between the quotation marks. Note that it may take a few hours for the key to work.
  2. Make any other adjustments to the widget settings at the top of the file.
  3. Run the script. It should prompt you for your location and (if enabled) your background photo. At the end, it will show a preview of the widget.
  4. Add a Scriptable widget to your home screen and select the script. That's it!

Want a transparent widget? Use my transparent widget script first. At the end of that script, select "Export to Photos", and then use the photo in the Weather Cal setup.

How it works

To make your layout, find the LAYOUT section header. You'll see two areas with lists of items: one for the left column, one for the right column. You can add and remove items from each list. Don't make changes to other parts of the code in this area (except for the column width). And, make sure every item ends with a comma, like this:

left,
date,

space,

right,
events,

Adding an alignment key, like left, right, or center will apply that alignment to everything after it. Adding space will add a space that automatically expands to fill the available room in the widget. Everything above the space will align to the top, and everything below will align to the bottom.

weather-cal's People

Contributors

btorresgil avatar mzeryck avatar theguy69 avatar

Stargazers

 avatar  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.