fix: 添加更多caffeinate参数以防止系统睡眠

添加-i和-s参数以全面防止系统睡眠,包括用户不活动和系统睡眠的情况
This commit is contained in:
2025-12-27 21:52:39 +08:00
parent 27e98a527f
commit 886b460d5e

View File

@@ -125,7 +125,7 @@ class AppState: ObservableObject {
// caffeinate // caffeinate
caffeinateProcess = Process() caffeinateProcess = Process()
caffeinateProcess?.executableURL = URL(fileURLWithPath: "/usr/bin/caffeinate") caffeinateProcess?.executableURL = URL(fileURLWithPath: "/usr/bin/caffeinate")
caffeinateProcess?.arguments = ["-d"] // -d caffeinateProcess?.arguments = ["-i", "-s", "-d"] // -i -s -d
// //
let outputPipe = Pipe() let outputPipe = Pipe()