This is an iOS scriptable widget which shows the mobile data usage.
- show percentage and actual usage
- show a status bar with an extrapolated bar to see how much you could use to have the remaining days in month each day the same data available
| local obs = obslua | |
| local ffi = require("ffi") | |
| local winmm = ffi.load("Winmm") | |
| -- Put a sound of your choosing next to "Beep on replay save.lua" and don't forget to match its name either in code below or rename your file. | |
| PROP_AUDIO_FILEPATH = script_path() .. "sound_npc_scanner_scanner_photo1.wav" | |
| ffi.cdef[[ | |
| bool PlaySound(const char *pszSound, void *hmod, uint32_t fdwSound); | |
| ]] |
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: deep-gray; icon-glyph: magic; | |
| // Licence: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 | |
| // Author: Marcus Raitner (https://fuehrung-erfahren.de) | |
| // Source: https://github.com/marcusraitner/COVID-19-Dashboard | |
| // ## Changelog | |
| // * 1.0.1: Correction of layout of label for covid-beds | |
| // * 1.0.2: Bug-Fix for Saar-Pfalz-Kreis (using GEN instead of county for join) | |
| // * 1.0.3: Bug-Fix for Landsberg a. Lech (now using both GEN and county) |
| // Version 1.3.0 | |
| // 27.11.2021 | |
| // | |
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: red; icon-glyph: notes-medical; | |
| // Mit Caching und Fallback | |
| const cacheMinutes = 60; // 60 min | |
| const today = new Date(); | |
| const neededTotalVaccinations = 83200000; |
| // ***Air Quality Widget*** | |
| // | |
| // Copyright (C) 2020 by ChristophObermeier | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software is hereby granted. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
| // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
| // Das Skript habe ich auf Deutsch lokalisiert und es stammt aus der Quelle -> https://gist.github.com/SuperC1r0/a8aef6ec73108d03862aa96f278a72d7 | |
| // | |
| // | |
| // | |
| // ***Air Quality Widget*** | |
| // | |
| // Copyright (C) 2020 by SuperC1r0 | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software is hereby granted. | |
| // However you have to respect the Terms of Service of the Air Quality Open Data Platform: https://aqicn.org/api/tos/ |
| // Corona Ampel Berlin Widget | |
| // | |
| // Copyright (C) 2020 by map <mail@map.wtf> | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
| // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
| // Lizenz: AGES Dashboard COVID19 AT | |
| // 3-stellige GKZ verwenden (zweite Spalte in https://covid19-dashboard.ages.at/data/CovidFaelle_GKZ.csv). | |
| // Widget Parameter: "204,KFL;312;706" für Klagenfurt Land (angezeigt als KFL), Korneuburg und Landeck | |
| // | |
| // Basiert auf der deutschen Variante von | |
| // - kevinkub https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664 | |
| // - Baumchen https://gist.github.com/Baumchen/6d91df0a4c76c45b15576db0632e4329 | |
| // | |
| // Angaben ohne Gewähr. |
| const apiUrl = "https://pass.telekom.de/api/service/generic/v1/status" | |
| let widget = await createWidget() | |
| widget.backgroundColor = new Color("#777777") | |
| if (!config.runsInWidget) { | |
| await widget.presentSmall() | |
| } | |
| Script.setWidget(widget) | |
| Script.complete() |
| let spotifyCredentials | |
| let widget = await createWidget() | |
| Script.setWidget(widget) | |
| Script.complete() | |
| async function createWidget() { | |
| let widget = new ListWidget() | |
| let spotifyIcon = await getImage("spotify-icon.png") | |
| widget.backgroundColor = new Color("1e2040") |