A simple, elegant menubar timer app for macOS built with Swift and SwiftUI.
- Lives in your menubar - No dock icon, pure menubar app
- Animated hourglass icon - Shows time remaining and empties as countdown progresses
- Quick access countdown timer - Click menubar icon to set timer
- Preset time buttons - 5, 15, 30, 40 minutes
- Custom time input - Enter any duration in minutes
- Pause/resume functionality - Control your timer with ease
- Progress bar - Visual indicator of time remaining
- Desktop notifications - Alert when timer completes
- Keyboard shortcuts - Enter to start, Space to pause/resume, Delete to reset
- Blue gradient app icon - Custom hourglass design
- macOS 13.0 or later
- Xcode 15.0 or later
-
Open
MKTimer.xcodeprojin Xcode:open MKTimer.xcodeproj
-
Select the "MKTimer" scheme at the top
-
Press
Cmd + Rto build and runOR
Click the Play button (▶) in the top-left corner of Xcode
# Build the Release version
xcodebuild -project MKTimer.xcodeproj -scheme MKTimer -configuration Release clean build
# The app will be located at:
# ~/Library/Developer/Xcode/DerivedData/MKTimer-*/Build/Products/Release/MKTimer.app
# Install to Applications folder
cp -r ~/Library/Developer/Xcode/DerivedData/MKTimer-*/Build/Products/Release/MKTimer.app /Applications/
# Launch the app
open /Applications/MKTimer.appOn first launch, you'll need to grant notification permissions:
- If
LSUIElementis set tofalseinInfo.plist, the app will show a permission dialog - click Allow - If set to
true(menubar-only mode), go to System Settings → Notifications and enable notifications for MKTimer - Once permissions are granted, you can set
LSUIElementback totruefor menubar-only operation
Once running, the app appears in your menubar:
- Idle state: Shows hourglass icon
- Timer running: Shows countdown time (MM:SS) with animated hourglass that empties as time runs out
- Click the icon to:
- Set a timer (enter minutes or use quick buttons)
- Start/pause/resume the timer
- View countdown progress
- Quit the app
No dock icon will appear - it's a pure menubar app!
To make MKTimer start automatically when you log in:
- Open System Settings → General → Login Items
- Click the + button under "Open at Login"
- Navigate to Applications and select MKTimer
- Done! MKTimer will now launch on startup
MKTimer/
├── MKTimer.xcodeproj/ # Xcode project file
├── generate_icon.swift # Script to generate app icons
├── LICENSE # MIT License
├── README.md # This file
└── MKTimer/
├── MKTimerApp.swift # App entry point, menubar setup, hourglass animation
├── ContentView.swift # Main UI with timer controls
├── TimerManager.swift # Timer logic and notifications
├── Info.plist # App configuration (LSUIElement = true for menubar-only)
└── Assets.xcassets/ # App icons and accent color
├── AppIcon.appiconset/ # Blue gradient hourglass icons (all sizes)
└── AccentColor.colorset/ # Orange accent color
If you want to modify the app icon:
# Edit generate_icon.swift to change colors/design
# Then run:
./generate_icon.swift
# Rebuild the app
xcodebuild -project MKTimer.xcodeproj -scheme MKTimer -configuration Release clean build- Start a timer: Click the hourglass icon in your menubar
- Choose duration: Enter time in minutes or click a preset (5m, 15m, 30m, 40m)
- Start: Press Enter or click "Start Timer"
- Watch countdown: The menubar shows time remaining with animated hourglass
- First quarter: Full hourglass (bottom half filled)
- Second quarter: Empty hourglass
- Third quarter: Top half filled
- Final quarter: Empty hourglass
- Pause/Resume: Click icon and use Space bar or click button
- Reset: Click icon and press Delete or click "Reset"
- Complete: Get a desktop notification when time's up!
- LSUIElement: Set to
truein Info.plist to hide from dock and make it menubar-only - NSStatusItem: Creates the menubar icon with dynamic title and image
- NSPopover: Shows the timer UI when clicked (.transient behavior for auto-dismiss)
- UserNotifications: Sends desktop notification on completion
- Combine: Reactive updates for menubar display using
@Publishedproperties - Timer: Uses Foundation's Timer for countdown (updates every second)
- SF Symbols: Hourglass icons that change based on progress
hourglass.bottomhalf.filled- First quarterhourglass- Second and fourth quartershourglass.tophalf.filled- Third quarter
- Change preset times: Edit the
[5, 15, 30, 40]array inContentView.swift:57 - Modify colors: Change gradient colors in
generate_icon.swiftor AccentColor - Different icon animations: Update the progress thresholds in
MKTimerApp.swift:63-70 - Add sound alerts: Integrate
NSSoundin addition to notifications - Recent timers: Store frequently used durations with UserDefaults
- Different notification sounds: Customize
UNMutableNotificationContent.sound
@mainandAppprotocol for app lifecycleNSApplicationDelegatewith@NSApplicationDelegateAdaptorfor AppKit integration@ObservedObjectand@Publishedfor reactive state managementObservableObjectprotocol for the timer logicCombineframework for observing timer state changes- SwiftUI views and layout with VStack, HStack, Button, TextField
- AppKit's
NSStatusBarandNSPopoverfor menubar functionality NSImage.SymbolConfigurationfor SF Symbols with custom sizesCGContextfor precise bitmap image generation
Icons are wrong size: Run ./generate_icon.swift to regenerate all icon sizes correctly
Notifications don't work: Check System Settings → Notifications and enable for MKTimer
App doesn't appear in menubar: Check that LSUIElement is set to true in Info.plist
Can't find built app: It's in ~/Library/Developer/Xcode/DerivedData/MKTimer-*/Build/Products/Release/
MIT License - see LICENSE file for details.
Enjoy your new timer app! 🎉