I'm tired of running the CLI command.I got fed up with using Amphetamine to keep my display awake, it had some really annoying bugs. Sometimes the display wouldn’t sleep even after disabling it, and other times it wouldn’t wake up properly after opening the lid. macOS by default ships with a utility called caffeinate which does the exact same thing. So, I wrote a small script for Raycast so that I don’t have to go around manually run the command in terminal and keep it minimized all the time. #!/bin/bash # Required parameters: # @raycast.schemaVersion 1 # @raycast.title Keep Awake # @raycast.mode silent # Optional parameters: # @raycast.icon ☀️ if pgrep -f "caffeinate -d" > /dev/null; then # It's running, so turn it off pkill -f "caffeinate -d" echo "Keep Awake: OFF" else # It's not running, so turn it on in the background caffeinate -d &>/dev/null & echo "Keep Awake: ON" fi Why not just set the display to never sleep? Because most companies and their IT departments will block you…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.