GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - daaniyaan/raycast-caffeinate: Mutually exclusive Raycast Script Commands for controlling macOS caffeinate modes with live status.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
allow-display-sleep-keep-mac-awake.sh
allow-display-sleep-keep-mac-awake.sh
 
 
caffeinate-status.sh
caffeinate-status.sh
 
 
keep-mac-and-display-awake.sh
keep-mac-and-display-awake.sh
 
 

Repository files navigation

Raycast showing the three Caffeinate controls

Raycast Caffeinate Controls

Three Raycast Script Commands for controlling macOS sleep without keeping Terminal open. The two active modes are mutually exclusive: starting one stops the other, and running the active command again turns it off.

Commands

Raycast command What it does
Caffeinate — Display Can Turn Off Runs caffeinate -is. Keeps the Mac awake while allowing the normal display-sleep timer to work.
Caffeinate — Keep Everything On Runs caffeinate -disu. Keeps both the Mac and display awake.
Caffeinate Status Shows the managed mode in Raycast and refreshes every 10 seconds without changing anything.

Requirements

  • macOS
  • Raycast
  • No third-party packages or administrator access

Installation

Clone the repository:

git clone https://github.com/daaniyaan/raycast-caffeinate.git

Alternatively, choose Code → Download ZIP on GitHub and extract it.

Then add the folder to Raycast:

  1. Open Raycast Settings → Extensions.
  2. Click + → Add Script Directory.
  3. Select the raycast-caffeinate folder.
  4. Open Raycast and search for caffeinate.

If Raycast does not detect the commands, make the scripts executable:

chmod +x *.sh

Usage

  • Use Display Can Turn Off for downloads, builds, or backups that should continue while the screen sleeps normally.
  • Use Keep Everything On for presentations, dashboards, or anything that requires the display to stay on.
  • Use Caffeinate Status to see whether either managed mode is active.
  • Run the active toggle again to restore normal macOS sleep behavior. You can also switch modes directly; the previous one stops automatically.

How it works

Each toggle starts caffeinate in the background and stores its process ID under:

~/Library/Caches/com.raycast.caffeinate-modes/

Before stopping anything, the scripts verify both the saved PID and the exact command. This prevents them from terminating unrelated caffeinate processes started by you or another app.

Notes

  • Display Can Turn Off does not switch off the screen immediately; it follows the timeout in System Settings → Lock Screen.
  • These commands do not prevent sleep caused by closing a MacBook lid.
  • The -s assertion works only on AC power; the -d and -i assertions provide the main behavior on battery power.
  • Assertions end automatically if the Mac restarts or the managed process exits.
  • The status command reports only the two modes managed by these scripts.

Troubleshooting

  • If the commands are missing, confirm the folder is added as a Raycast Script Directory and run chmod +x *.sh.
  • If the Mac still sleeps, check Caffeinate Status, keep a MacBook lid open, and inspect assertions with pmset -g assertions.
  • Seeing OFF after a restart is normal; run the desired toggle again.

Privacy and security

The scripts make no network requests, collect no analytics, require no administrator access, and do not modify permanent macOS power settings. Their PID files contain only local process numbers.

License

MIT — see LICENSE.

About

Mutually exclusive Raycast Script Commands for controlling macOS caffeinate modes with live status.

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.