diff --git a/README.md b/README.md index 035bdc1..516a903 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,18 @@ al life and enhance productivity. - **Sorting**: Items can be sorted alphabetically or by usage frequency. - **Autosizing**: The widget dynamically adjusts text size based on usage frequency, making more frequently used items more prominent. +### ZenTrate_ultra_light.js + +ZenTrate_ultra_light is based on ZenTrate.js but is strongly reduced in customization and it is created to run as fast as possible, with the least amount of battery usage. Its layout is based on the day/time widget of the IOS Minimal App (Minimalist Launcher). + +**Still Customizable:** +- Items (flexible amount) with their belonging URL schemes +- Font and font size +- Colours (background, font) +- if needed: spacing + +![screenshot](https://github.com/OGentner/scriptables/blob/main/Screenshot_Scriptable_Widget.PNG?raw=true) + ### ZenLendar.js ZenLendar displays your calendar events in a clean, concise format. It integrates directly with ZenTrate, following the same minimal design principles. diff --git a/ZenTrate_ultra_light.js b/ZenTrate_ultra_light.js new file mode 100644 index 0000000..2192b39 --- /dev/null +++ b/ZenTrate_ultra_light.js @@ -0,0 +1,52 @@ +// Variables used by Scriptable. +// These must be at the very top of the file. Do not edit. +// icon-color: deep-gray; icon-glyph: bars; +// ZenTrate Minimal: Clean Productivity Launcher + +const items = [ + { name: "Spotify", scheme: "spotify://" }, + { name: "Maps", scheme: "comgooglemaps://" }, + { name: "Whatsapp", scheme: "whatsapp://" }, + { name: "Meditation", scheme: "shortcuts://run-shortcut?name=Meditation" } +] + +const bgColor = new Color("#242424") +const textColor = new Color("#f8f8f8") +const font = new Font("AvenirNext-Bold", 24) + +const widget = new ListWidget() +widget.backgroundColor = bgColor +widget.setPadding(0, 8, 0, 8) + +const mainStack = widget.addStack() +mainStack.layoutVertically() + +for (let i = 0; i < items.length; i++) { + const item = items[i] + + const row = mainStack.addStack() + row.layoutHorizontally() + row.bottomAlignContent() + row.addSpacer(23) + + const stack = row.addStack() + stack.setPadding(4, 4, 4, 4) + stack.url = item.scheme + + const text = stack.addText(item.name) + text.font = font + text.textColor = textColor + text.minimumScaleFactor = 0.5 + + // ✅ Pushes the content to the left + row.addSpacer() + + if (i < items.length - 1) mainStack.addSpacer(10) +} + +if (config.runsInWidget) { + Script.setWidget(widget) +} else { + widget.presentLarge() +} +Script.complete()