A macOS app that forces you to stay intentional with your time by showing your current schedule (or a reminder blocking dialog when you don't have any) when you unlock your Mac.
Every moment should have a plan. When you unlock your Mac, you should be confronted with the question: "What do you want to do?" If you have a scheduled event, it reminds you. If not, it prompts you to create one, preventing aimless time-wasting.
- 🔓 Unlock Detection: Automatically shows your current schedule when you unlock or wake your Mac
- 📅 Calendar Integration: Reads from all your calendars
- ⏱️ Progress Tracking: Shows real-time progress and remaining time for current events
- 🎨 Beautiful UI: Clean, modern interface with smooth animations
- 🚫 No Distractions:
- Auto-hides after 3 seconds when showing events
- Stops periodic checks when no events exist to avoid focus interruption
- ⌨️ No Accidental Quit: Command+Q is disabled to prevent accidental closure
- 🔄 Auto-start: Registers as a login item automatically
- macOS 14.0 or later
- Calendar access permission
# Clone the repository
git clone https://github.com/ChrisZou/alwayshaveaplan.git
cd alwayshaveaplan
# Build and run
swift run./build-release.shThe app will be created at run/release/AlwaysHaveAPlan.app. You can copy it to your Applications folder.
- First Launch: Grant Calendar access when prompted
- Add Events: Add your daily events to any calendar
- Unlock and See: Every time you unlock your Mac, you'll see your current schedule
# Run in development mode (terminal stays open, Ctrl+C to quit)
swift run
# Build
swift build
# Build release version
./build-release.sh- Auto-hide Duration: Modify
autoHideAfterparameter inSources/App/AppController.swift - Periodic Check Interval: Modify timer interval in
Sources/App/AppController.swift
- Bootstrapper: Creates app bundle for Calendar permissions
- AppController: Manages unlock detection and event checking
- CalendarManager: Handles EventKit integration
- WindowManager: Manages floating window display
- FloatingPromptView: SwiftUI interface
For detailed architecture, see CLAUDE.md.
MIT License - see LICENSE file for details.
一个macOS 应用,通过在解锁 Mac 时显示当前日程或是一个置顶的提醒窗口(如果当前没有日程),强力推动你有计划地度过每一刻。
每一块时间都应该有计划地度过。当你解锁 Mac 时,应该直面"你想干什么?"这个问题。如果有日程在进行,就显示出来提醒;如果没有日程,就用这个问题唤起自我觉察,避免漫无目的地浪费时间。
- 🔓 解锁检测:自动在解锁或唤醒 Mac 时显示当前日程
- 📅 日历集成:从所有日历中读取事件
- ⏱️ 进度追踪:实时显示当前事件的进度和剩余时间
- 🎨 精美界面:简洁现代的界面设计,流畅的动画效果
- 🚫 无干扰模式:
- 显示事件后 3 秒自动隐藏
- 无日程时停止定期检查,避免焦点被打断
- ⌨️ 防止误退出:禁用 Command+Q,防止误关闭
- 🔄 开机自启:自动注册为登录项
- macOS 14.0 或更高版本
- 日历访问权限
# 克隆仓库
git clone https://github.com/ChrisZou/alwayshaveaplan.git
cd alwayshaveaplan
# 构建并运行
swift run./build-release.sh应用会被创建在 run/release/AlwaysHaveAPlan.app,你可以将它复制到应用程序文件夹。
- 首次启动:根据提示授予日历访问权限
- 添加事件:将你的日常安排添加到任意日历中
- 解锁查看:每次解锁 Mac 时,都会看到当前的日程
# 开发模式运行(终端保持打开,Ctrl+C 退出)
swift run
# 构建
swift build
# 构建发行版
./build-release.sh- 自动隐藏时长:修改
Sources/App/AppController.swift中的autoHideAfter参数 - 定期检查间隔:修改
Sources/App/AppController.swift中的计时器间隔
- Bootstrapper:创建 app bundle 以获取日历权限
- AppController:管理解锁检测和事件检查
- CalendarManager:处理 EventKit 集成
- WindowManager:管理浮动窗口显示
- FloatingPromptView:SwiftUI 界面
详细架构说明请查看 CLAUDE.md。
MIT License - 详见 LICENSE 文件。

