Skip to content

nxsflow/keep-alive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

keep-alive

Keeps the Mac awake as long as the terminal window stays open — and shows, big and clear, that this window is keeping the machine awake and since when. That makes it easy to spot the "blocking" window at any time.

How it works

The script starts caffeinate -i (prevents idle sleep) and ties it to the lifetime of the script via -w "$$". As soon as the script ends — by Ctrl+C or closing the window — the Mac is allowed to sleep again.

The window displays a large ASCII banner along with the elapsed time since start.

Usage

./keep-alive.sh

To stop: Ctrl+C or close the window.

Requirements

  • macOS (uses the built-in caffeinate)
  • bash

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages