Skip to content

Commit

Permalink
Add option to turn No Sleep on for N minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
roele committed Mar 13, 2021
1 parent 0ef1d28 commit 0a03822
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Binary file modified No Sleep.alfredworkflow
Binary file not shown.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# Alfred.app Workflows

## No Sleep
# Alfred.app No Sleep Workflow

<img src="assets/no-sleep.png" width="64" height="64" alt="No Sleep" />

Workflow to prevent macOS from sleeping.

Allows you to close the lid of your MacBook without entering sleep mode if sleep is disabled.

### State agnostic
* `on` - Turn on No Sleep (disables sleep)
* `on for` - Turn on No Sleep for N minutes (disables sleep for N minutes)
* `off` - Turn off No Sleep (enables sleep)

## State agnostic

The workflow is state agnostic and shows the `on`/`off` options according to the current state.

### Requires administrator privileges
## Sleep for N minutes

Turn on No Sleep only for N minutes.
> Note: Shows a password prompt after N minutes to turn off No Sleep. Does currently not prevent the battery from being drained if you forget to turn off No Sleep.
## Requires administrator privileges

The command (`pmset -a disablesleep [0,1]`) run by the workflow requires administrator privileges and therefore a password prompt is shown when the workflow is executed.

0 comments on commit 0a03822

Please sign in to comment.