mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-19 02:26:22 +08:00
Provision macOS disable screensaver in current session
Task-number: QTQAINFRA-1244 Change-Id: I3a27d8cdee8cd7b22d86116d58009e952ab536ea Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
@@ -51,6 +51,10 @@ ExceptionDisableScreensaverPassword=105
|
||||
try
|
||||
(
|
||||
echo "Disable Screensaver"
|
||||
# For current session
|
||||
defaults -currentHost write com.apple.screensaver idleTime 0 || throw $ExceptionDisableScreensaver
|
||||
|
||||
# For session after a reboot
|
||||
mkdir -p "$HOME/Library/LaunchAgents" || throw $ExceptionDisableScreensaver
|
||||
(
|
||||
cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT
|
||||
|
||||
@@ -51,6 +51,10 @@ ExceptionDisableScreensaverPassword=105
|
||||
try
|
||||
(
|
||||
echo "Disable Screensaver"
|
||||
# For current session
|
||||
defaults -currentHost write com.apple.screensaver idleTime 0 || throw $ExceptionDisableScreensaver
|
||||
|
||||
# For session after a reboot
|
||||
mkdir -p "$HOME/Library/LaunchAgents" || throw $ExceptionDisableScreensaver
|
||||
(
|
||||
cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <<EOT
|
||||
|
||||
Reference in New Issue
Block a user