mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-08 07:56:54 +08:00
Setting the idleTime on currentHost works well, until the hardware UUID changes and thus the host ID for the setting. With kvm that happens quite frequently, with vmware less but also occasionally (deep clone for example). By disabling the screensaver on start-up we can cover all cases quite easily. Change-Id: Ibdcf404430656f9caa47386ca3c732366ddfc8c7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
27 lines
780 B
Bash
27 lines
780 B
Bash
#!/bin/sh
|
|
|
|
mkdir -p $HOME/Library/LaunchAgents
|
|
cat >$HOME/Library/LaunchAgents/no-screensaver.plist <<EOT
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>org.qt.io.screensaver_disable</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>defaults</string>
|
|
<string>-currentHost</string>
|
|
<string>write</string>
|
|
<string>com.apple.screensaver</string>
|
|
<string>idleTime</string>
|
|
<string>0</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<false/>
|
|
</dict>
|
|
</plist>
|
|
EOT
|