A lightweight Pomodoro timer for the macOS menu bar. Built with SwiftUI.
MenuBarTimer is a clean, native macOS Pomodoro timer that lives in your menu bar. It helps you stay focused using the Pomodoro Technique with customizable work and break intervals, session statistics, and automatic mode transitions.
- Focus — 25-minute work sessions (customizable)
- Short Break — 5-minute breaks (customizable)
- Long Break — 15-minute breaks (customizable)
- Automatic mode switching after each session
- Optional auto-start for the next session
- Displays live countdown in menu bar when running
- Timer icon when idle
- Compact window with circular progress ring
- Daily pomodoro count tracking
- 7-day bar chart with today highlighted
- Weekly summary
- Data persisted across app restarts
- Custom durations for focus, short break, and long break
- Configurable long break interval (every N pomodoros)
- Auto start next session toggle
- Launch at login
- System notifications on session completion
- Date-based timer (accurate across sleep/wake)
- Auto-cleanup of history data older than 30 days
- Smooth page transition animations
- macOS 13.0 (Ventura) or later
- Xcode 14.0 or later (for building from source)
# Clone the repository
git clone https://github.com/sealovesky/MenuBarTimer.git
cd MenuBarTimer
# Open in Xcode
open MenuBarTimer.xcodeproj
# Build and run (⌘R)Or build from command line:
xcodebuild -scheme MenuBarTimer -configuration Release buildCheck the Releases page for pre-built binaries.
- Launch — MenuBarTimer appears in your menu bar as a timer icon
- Click — Click the icon to open the timer panel
- Choose Mode — Select Focus, Short Break, or Long Break
- Start — Press the play button to begin the countdown
- Stats — Click "Stats" to view your 7-day history
- Settings — Click "Settings" to customize durations and preferences
MenuBarTimer/
├── MenuBarTimerApp.swift # App entry point (MenuBarExtra)
├── TimerManager.swift # Timer logic, persistence, notifications
├── MenuBarView.swift # UI: timer, settings, statistics views
├── Assets.xcassets/ # App icon
├── en.lproj/
│ └── Localizable.strings # English localization
└── zh-Hans.lproj/
└── Localizable.strings # Chinese localization
- UI Framework: SwiftUI
- Scene: MenuBarExtra (.window style)
- Notifications: UserNotifications (UNUserNotificationCenter)
- Launch at Login: ServiceManagement (SMAppService)
- Settings: UserDefaults
- Localization: Localizable.strings (en, zh-Hans)
- Custom durations
- Auto start next session
- Configurable long break interval
- 7-day statistics with bar chart
- Launch at login
- Localization (English & Chinese)
- App icon
- Global keyboard shortcuts
- Notification sound toggle
- Menu bar icon showing today's count
- Custom theme colors
- Data export (CSV)
MIT License - see LICENSE for details.
MenuBarTimer 是一款简洁的 macOS 原生菜单栏番茄钟应用。使用番茄工作法帮助你保持专注,支持自定义工作和休息时长、统计数据和自动模式切换。
- 专注 — 25 分钟工作时段(可自定义)
- 短休息 — 5 分钟休息(可自定义)
- 长休息 — 15 分钟休息(可自定义)
- 每个时段结束后自动切换模式
- 可选自动开始下一个时段
- 运行时在菜单栏显示实时倒计时
- 空闲时显示计时器图标
- 紧凑的弹出窗口,带圆形进度环
- 每日番茄完成数追踪
- 近 7 天柱状图,今日高亮
- 本周汇总
- 数据持久化,重启不丢失
- 自定义专注、短休息、长休息时长
- 可配置长休息间隔(每 N 个番茄后)
- 自动开始下一轮开关
- 开机自启动
- 时段完成时发送系统通知
- 基于时间差的计时器(休眠唤醒后依然准确)
- 自动清理 30 天前的历史数据
- 页面切换平滑动画
- macOS 13.0 (Ventura) 或更高版本
- Xcode 14.0 或更高版本(从源码构建)
# 克隆仓库
git clone https://github.com/sealovesky/MenuBarTimer.git
cd MenuBarTimer
# 用 Xcode 打开
open MenuBarTimer.xcodeproj
# 构建运行 (⌘R)或使用命令行构建:
xcodebuild -scheme MenuBarTimer -configuration Release build前往 Releases 页面下载预编译版本。
- 启动 — MenuBarTimer 会出现在菜单栏,显示为计时器图标
- 点击 — 点击图标打开计时面板
- 选择模式 — 选择专注、短休息或长休息
- 开始 — 按下播放按钮开始倒计时
- 统计 — 点击「统计」查看近 7 天记录
- 设置 — 点击「设置」自定义时长和偏好
MenuBarTimer/
├── MenuBarTimerApp.swift # 应用入口 (MenuBarExtra)
├── TimerManager.swift # 计时器逻辑、持久化、通知
├── MenuBarView.swift # UI:计时器、设置、统计页面
├── Assets.xcassets/ # 应用图标
├── en.lproj/
│ └── Localizable.strings # 英文本地化
└── zh-Hans.lproj/
└── Localizable.strings # 中文本地化
- UI 框架: SwiftUI
- 场景: MenuBarExtra(.window 样式)
- 通知: UserNotifications (UNUserNotificationCenter)
- 开机自启: ServiceManagement (SMAppService)
- 设置存储: UserDefaults
- 本地化: Localizable.strings (en, zh-Hans)
- 自定义时长
- 自动开始下一轮
- 可配置长休息间隔
- 近 7 天柱状图统计
- 开机自启动
- 多语言支持(中文/英文)
- 应用图标
- 全局快捷键
- 通知声音开关
- 菜单栏显示今日番茄数
- 自定义主题颜色
- 数据导出(CSV)
MIT License - 详见 LICENSE
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Inspired by the Pomodoro Technique by Francesco Cirillo
- Built with SwiftUI and native macOS frameworks


