Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newmarcel/awaken
A command line tool that prevents your Mac from going to sleep.
https://github.com/newmarcel/awaken
cpp cpp17 macos utility
Last synced: about 3 hours ago
JSON representation
A command line tool that prevents your Mac from going to sleep.
- Host: GitHub
- URL: https://github.com/newmarcel/awaken
- Owner: newmarcel
- License: mit
- Created: 2020-05-02T11:50:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-28T11:39:54.000Z (9 months ago)
- Last Synced: 2024-01-28T13:28:58.475Z (9 months ago)
- Topics: cpp, cpp17, macos, utility
- Language: C++
- Size: 123 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Awaken
A command line tool that prevents your Mac from going to sleep.## Description
`awaken` is a re-implementation of the [`caffeinate`](https://web.archive.org/web/20140604153141/https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/caffeinate.8.html) command line tool included in macOS. The project includes a `libawaken.a` static library to embed this behavior in other applications, like my macOS application **[KeepingYouAwake](https://github.com/newmarcel/KeepingYouAwake)**.## Installation
`awaken` can be built and installed using the.[`meson`](https://mesonbuild.com) build system and a `clang` compiler that supports C++23 (e.g. from a recent Xcode version). For convenience Swift Package Manager support is also provided.```bash
meson build --buildtype=release
cd build
meson install
awaken —-help
```## Usage
```
awaken - prevents your Mac from going to sleep.
Usage:
./build/awaken [OPTION...]-d, --display-sleep prevent the display from idle sleeping
-s, --system-sleep prevent the system from idle sleeping (default:
true)
-t, --timeout N timeout in seconds until the sleep assertion expires
(default: 0)
-b, --battery-level N a minimum battery level on devices with a built-in
battery that causes the sleep assertion to expire
(e.g. 20 for <= 20% remaining battery). Values above 95
are unreliable and depend on the battery health.
(default: 0)Help options:
-h, --help print this help
-v, --version print version information
```## Documentation
You can use [doxygen](http://www.doxygen.nl) (`brew install doxygen`) to generate the class documentation for this project.## License
All files in this project are covered by the [MIT license](http://opensource.org/licenses/MIT).