Weather Widget

Scriptable
Widget Size
API
Location
Theme
Status
Last Updated

A clean and elegant iOS weather widget built with Scriptablearrow-up-right, fetching real-time data from the OpenWeather API. The widget adapts layout and font size based on weather conditions and city names for improved readability.

✨ Features

  • πŸ“ Auto Location Detection: Fetches your current coordinates using iOS GPS.

  • 🌀️ Real-Time Forecast: Displays current temperature and condition.

  • πŸ™οΈ City Recognition: Dynamically detects and displays the city name.

  • πŸ“ Responsive Typography: Adjusts font size based on widget size, text length, and content.

  • 🎨 Gradient Backgrounds: Custom gradients for stylish appearance.

  • πŸ” Auto Refresh: Refreshes every 30 minutes to stay updated.

βš™οΈ Setup Instructions

Step 1: Get Your Free OpenWeather API Key

  1. Create a free account or log in.

  2. Visit the API Keysarrow-up-right page.

  3. Click Generate to create a new key.

  4. Copy the generated key.

Step 2: Add Your API Key

In the script file, replace this line:

With:

Step 3: Add the Script to Scriptable

  1. Open the Scriptable app on your iPhone or iPad.

  2. Tap the + button to create a new script.

  3. Paste the entire code into the editor.

  4. Save the file with a name like Weather Widget.

Step 4: Add the Widget to Home Screen

  1. Long-press the Home Screen to enter edit mode.

  2. Tap the + button at the top.

  3. Search for and select Scriptable.

  4. Choose a widget size (Small, Medium, or Large).

  5. Tap Add Widget.

  6. Long-press the widget and tap Edit Widget.

  7. Set the Script to your saved weather widget script.

  8. Leave parameters blank (it auto-detects location).

🌈 Customization Options

You can tweak the following parts of the script to personalize the widget:

Background Themes

Update this line to switch between preset themes:

Other options include:

  • blackBlueGradientClr

  • lightDarkBlueGradientClr

Units

Choose between Celsius and Fahrenheit:

🧠 How It Works

  • Location is retrieved using Location.current().

  • The weather API uses your coordinates to return:

    • feels_like temperature

    • weather description

    • city name

  • The widget parses this and smartly adjusts the text layout.

    • E.g., long descriptions like "scattered intensity rain" will wrap.

    • City names like "New York" will only display "New" to keep layout clean.

πŸ”„ Refresh Logic

The widget is set to automatically refresh every 30 minutes:

πŸ“Έ Screenshots

NOTE: The the values may differ bassed on your current location, the above are just some examples

πŸ™Œ Feedback & Credits

Have questions or want to request a feature? DM me on Instagramarrow-up-right or email: rushiofficial1205@gmail.comenvelope

This widget is a reflection of clean UI and practical design. If you'd like to expand it (e.g., 3-day forecasts, icon-based UI), feel free to fork it.

πŸ“œ License

This project is licensed under the MIT License. Feel free to remix, reuse, and modify with attribution.

Stay informed, stay stylish – RP

Last updated