https://github.com/hildjj/powerpause
https://github.com/hildjj/powerpause
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hildjj/powerpause
- Owner: hildjj
- Created: 2017-03-09T20:48:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T17:23:50.000Z (about 8 years ago)
- Last Synced: 2025-02-12T19:37:44.554Z (4 months ago)
- Language: Objective-C
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PowerPause: pause a shell command when you are on battery
When you're compiling [Firefox](https://github.com/mozilla/gecko-dev) using `./mach build`, and you pick up your laptop to go do something, disconnecting the power cable, you look down 10 minutes later to find your battery is dead.
Instead:
```shell
PowerPause ./mach build
```Now, when you disconnect power, the build process will get sent a Control-Z (SIGTSTP). When you plug back in, the process will get continued (SIGCONT).
# Platform support
OSX only for now. Will take patches for other OSes that include build files.
# Build on OSX
```shell
git clone https://github.com/hildjj/PowerPause.git
cd PowerPause
xcodebuild
./build/Release/PowerPause ls
```