Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-05-26 09:15:47 -07:00
parent 22e50b3f11
commit 0d3b526db0
6 changed files with 96 additions and 14 deletions

View File

@@ -116,8 +116,8 @@ func darwinScreenLockMode(raw string) (string, int, bool) {
if strings.Contains(lower, "off") {
return "off", -1, true
}
if idx := strings.Index(lower, "seconds"); idx >= 0 {
prefix := strings.Fields(lower[:idx])
if before, _, ok := strings.Cut(lower, "seconds"); ok {
prefix := strings.Fields(before)
if len(prefix) == 0 {
return "seconds", -1, true
}