agaragou/LockScreen-Calendar-ShortCut
关于
Shortcut to display year calendar with events on the lock screen wallpaper for iPhones
效率与自动化可以做什么
- Auto-Adaptation: Adapts to your iPhone's screen size.
- Native Colors: Uses colors set in the Calendar app.
- Filtering: Displays only calendars with a specific prefix (default *), or you can add them manually in script itself to keep the screen uncluttered.
- Event Priority: When events overlap, priority is determined alphabetically by calendar name or randomly (in case of manually added calendars priority is determined by order in script).
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文LockScreen Calendar Shortcut
This script for the Scriptable app generates minimalistic wallpapers for iPhone featuring a yearly calendar, event display, and current year progress.
Description
The script automatically scans your iOS calendars, filters them by a special prefix (or you can add them manually in script itself), and displays events on a yearly grid on your lock screen. Event colors are taken directly from iOS Calendar settings. It supports custom wallpapers from your Photos album, beautiful gradients, or clean solid colors.
Features
- Auto-Adaptation: Adapts to your iPhone's screen size.
- Native Colors: Uses colors set in the Calendar app.
- Filtering: Displays only calendars with a specific prefix (default
*), or you can add them manually in script itself to keep the screen uncluttered. - Event Priority: When events overlap, priority is determined alphabetically by calendar name or randomly (in case of manually added calendars priority is determined by order in script).
- Backgrounds:
- Custom Photos: Use any photo from your library as a background.
- Gradients: Use stylish CSS-like linear gradients (3 colors).
- Solid Colors: Minimalist solid background.
- Legibility: "Container" card option to ensure calendar is readable on any background.
- Statistics: Shows events count or year progress.
Installation and Setup
Option A: Using Scriptable App (Recommended)
- Install Scriptable from the App Store.
- Create a new script in Scriptable, name it
LockScreenCalendar, and paste the code fromscript.jsinto it. - In iOS settings (Calendar), rename existing calendars that you want to display by adding
*to the beginning (e.g.,*Work) or add them manually in script.
Option B: Paste Directly in Shortcuts
- You can skip creating a file in Scriptable and paste the entire code directly into the Run Script action in Shortcuts.
Shortcuts Workflow Setup
[!IMPORTANT] iOS 27.2+ / script v33+: the script now returns the image as a Base64 string instead of a temporary file path (newer iOS sandbox rules no longer let Shortcuts read Scriptable's temp files). Your Shortcut needs a Base64 → Decode step before Set Wallpaper — see step 3 below. If you're updating from an older version, add that step and re-select the image in Set Wallpaper.
1. Basic Setup (Solid Color / Gradient)
- Create a new Shortcut.
- Add Run Script action (Scriptable). Select your script (or paste code).
- Add Base64 Encode action right after Run Script (search "Base64" in the actions bar).
- Tap Encode and change it to Decode.
- Input: "Output" (the result of Run Script).
- Add Set Wallpaper action.
- Image: Select "Base64 Encoded" (the result of the Decode step).
- Screen: "Lock Screen".
- Disable "Show Preview" and "Crop to Subject".
- For a gradient background, set
showWallpaper: falseanduseGradient: truein the script. For a solid color, set both tofalse(color iscolors.bg).
2. Using Custom Wallpaper (Photos)
To use a random photo from an album as a background:
- Create an album in Photos (e.g., "Wallpapers").
- In Shortcuts, add Find Photos action at the very top.
- Filter: Album is "Wallpapers".
- Sort by: Random (new photo every run) — or Date Taken / Latest First to always use the newest photo, as in the screenshot below.
- Limit: Get 1 Photo.
- In the Run Script action:
- Tap and hold the Parameter field (it might say "Input" or be empty).
- Select Photos (the output from the first step).
- In the script
CONFIG, ensure:showWallpaper: true
Full Shortcut (iOS 27.2+): Find Photos → Run Script → Decode Base64 → Set Wallpaper

Automation
To update daily:
- Open the Automation tab in Shortcuts and tap + (New Automation).
- Select Time of Day (e.g., 08:00), set it to repeat Daily.
- Choose Run Immediately and turn off Notify When Run so it happens in the background.
- Select your shortcut (or add a Run Shortcut action pointing to it).

Configuration
Customize CONFIG at the top of the script:
const CONFIG = {
// --- 1. GENERAL & APPEARANCE ---
monthsToShow: 12, // 12 = Year, 3 = Quarter, 1 = Month
monthsPerRow: 3, // Standard is 3
monthOffset: 0, // Start from 0 = Current, -1 = Previous, 1 = Next
contentScale: 1.0, // Global Scale Multiplier (>1.0 bigger, <1.0 smaller)
fixedYear: true, // If true: 12 months -> Jan..Dec; 6 months -> Jan..Jun or Jul..Dec
// Day & Dot Settings
showDayNumbers: false, // true = numbers, false = dots
firstDayOfWeek: 1, // 0 = Sunday, 1 = Monday
highlightWeekends: true,
dimPastDays: true, // If true, past days are 30% opacity
dayFontSizeMultiplier: 1.1, // Font size for days
dotSizeMultiplier: 1.1, // Only applies if showDayNumbers is false
// --- 2. BACKGROUND SETTINGS ---
// Custom Wallpaper (Photo from Shortcuts)
showWallpaper: true, // Priority 1: Use photo if provided
overlayOpacity: 0.3, // Darken photo (0.0 - 1.0)
// Gradient (Priority 2: Used if no photo or showWallpaper=false)
useGradient: true,
gradientColors: ["#0F2027", "#203A43", "#2C5364"], // Example: "Moonlit Asteroid"
// Container (Card behind calendar for better visibility on wallpaper)
showContainer: true,
containerOpacity: 0.80,
containerRadius: 15,
// --- 3. LAYOUT & WIDGETS ---
// Avoid Widget Areas?
widgetsTop: false,
topWidgetsPadding: 0.36, // 0.36 = 36% of screen height
widgetsBottom: false,
bottomWidgetsPadding: 0.17, // 0.17 = 17% of screen height
// --- 4. DATA & CALENDARS ---
calendarPrefix: "*",
// specificCalendarNames: ["Work", "Home"],
specificCalendarNames: [],
// Manual Dates ["MM-DD"]
manualSignificantDates: [],
// Event Sorting
sortByName: true, // true = Alphabetical, false = System order
// --- 5. STATISTICS ---
showStats: true,
statsMode: "events", // "progress" or "events" // year progress or # events today
// --- 6. COLORS / 7. INTERNAL RATIOS ---
// ... see script.js
};
探索相关项目
加载中…