Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
52 changes: 52 additions & 0 deletions ZenTrate_ultra_light.js
Original file line number Diff line number Diff line change
@@ -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()