Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lpiet

macrumors newbie
Original poster
Nov 29, 2022
3
0
Hey everyone!
I am looking for a pretty specific command to use in a shortcut:

Disable Screen Saver and Standby

For explanation: I am an event technician and often I use my MacBook Pro connected to our big PA. I need to start audio Cues on a short notice and my screen saver and standby mode get in the way of that. I know I can easily disable Screen Saver in the settings App but I often forget to set it back. That's why I wanted to write a simple shortcut that lets me disable Screen Saver and Standby and then another Shortcut to get back to my normal settings.

I searched the internet but can't find a way to do that. Can anyone kindly help me with that? Or is it simply not possible with shortcuts?

Looking forward to your replies. Thanks a lot!
 
Disable screensaver
Code:
defaults -currentHost write com.apple.screensaver idleTime 0

set screensaver to default, 20 munutes
Code:
defaults -currentHost write com.apple.screensaver idleTime 1200

Disable sleep
Code:
sudo systemsetup -setcomputersleep Never

Sleep after 10 minutes of inactivity
Code:
sudo systemsetup -setcomputersleep 10
 
  • Like
Reactions: lpiet
Disable screensaver
Code:
defaults -currentHost write com.apple.screensaver idleTime 0

set screensaver to default, 20 munutes
Code:
defaults -currentHost write com.apple.screensaver idleTime 1200

Disable sleep
Code:
sudo systemsetup -setcomputersleep Never

Sleep after 10 minutes of inactivity
Code:
sudo systemsetup -setcomputersleep 10
Thanks mate! The screen saver commands seem to work - the sleep ones somehow not? Maybe I'm just too stupid though - this is always a possibility....
 
Sorry, I’m not sure what you mean by standby mode.

From the pmset manual (man pmset)
"standby causes kernel power management to automatically hibernate a machine after it has slept for a specified time period. This saves power while asleep. This setting defaults to ON for supported hardware. The setting standby will be visible in pmset -g if the feature is supported on this machine."

The commands are

Code:
sudo pmset standby 1

Code:
sudo pmset standby 0
 
  • Like
Reactions: lpiet
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.