A simple macOS menu bar application that prevents your system from sleeping for a user-specified duration.
- Keep your Mac awake for predefined time intervals
- Simple menu bar interface with coffee cup icon
- Time options: 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 6 hours, 12 hours, 24 hours
- Stop button to cancel active timers
- Clean, minimal UI design
- macOS 11.0 or later
- Xcode 12.0 or later
- Swift 5.3 or later
-
Clone this repository:
git clone https://github.com/PtrckM/kape-pa.git cd kape-pa -
Open the project in Xcode:
open "kape pa/kape pa.xcodeproj" -
Build and run the project:
- Select "My Mac" as the destination
- Press
Cmd + Rto build and run - Or go to
Product > Run
-
The app will appear in your menu bar as a coffee cup icon
- Open the project in Xcode
- Select "Any Mac" as the destination
- Go to
Product > Archive - In the Organizer window, select the archive and click "Distribute App"
- Choose "Copy App" and follow the prompts
- Click the coffee cup icon in your menu bar
- Select a time duration from the dropdown menu
- The app will prevent your Mac from sleeping for the selected duration
- The menu bar icon will show a countdown timer
- Click the stop button (square icon) to cancel the timer early
- Click the power button to quit the app
The app uses macOS power management APIs (IOPMAssertionCreateWithName) to prevent system sleep and display sleep. When you set a timer, it creates a power assertion that keeps your Mac awake. The assertion is automatically released when the timer expires or when you manually stop it.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Created by PtrckM
- Initial release
- Menu bar app with sleep prevention
- Multiple time interval options
- Stop timer functionality
- Coffee cup icon