68fed087-9049-446f-bfc5-3f8.../Info.plist
徐翔宇 0cff83fc38 feat: v0.2.0 — sleep-aware timers + auto-loop pomodoro
Core change: both timers stop lying when the Mac sleeps or the user
walks away. Old code measured wallclock from a stored "start"
timestamp, so 4 hours of lid-closed showed up as 4 hours of "sitting"
and a 25-minute focus could quietly stretch across multiple hours
because Timer.scheduledTimer pauses during sleep.

What changed:

- Sit timer now reads CGEventSource HID idle to count only seconds
  with real input activity. New Sources/engine/SystemIdle.swift
  iterates the user-input event types and takes the min. Idle ≥ 5
  min resets the accumulator (counts as a real break). Tick-gap >
  30 s flags a sleep/wake and clears too — covers the case where
  the user unlocks and idle resets to ~0 instantly.

- Pomodoro switched from "decrement counter every second" to a
  wallclock end-time. Persisted to UserDefaults so quit/relaunch
  recovers correctly: still-running phases keep counting; phases
  whose end-time has already passed get caught up (one focus
  credited if missed) and the timer returns to idle.

- Auto-loop with classic 4-pack rhythm: focus → short break →
  focus → … on the 4th focus a long break (default 15 min) replaces
  the short break, then the cycle resets. Default ON; toggle pill
  in the settings row turns it off when the user wants manual
  restarts.

- New cycle-progress dot row (●●○○) next to the phase badge so
  the user can see where they are in the 4-pack at a glance.

- SitView tip text rewritten to reflect the new semantics: "只统计
  你真正在键盘前的时间。离开 5 分钟以上自动归零,午休/会议不会被
  算进去。"

User-facing wins:
- Closing the lid for lunch no longer fakes 90 minutes of sitting.
- A 25-min focus that survives a sleep cycle ends accurately.
- Start a focus once, the rhythm runs all morning.
2026-04-30 11:23:09 +08:00

35 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>CFBundleDevelopmentRegion</key>
<string>zh_CN</string>
<key>CFBundleExecutable</key>
<string>WorkerPlugin</string>
<key>CFBundleIdentifier</key>
<string>com.mioisland.plugin.worker</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>摸鱼侠</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.2.0</string>
<key>CFBundleVersion</key>
<string>2</string>
<key>NSPrincipalClass</key>
<string>WorkerPlugin.WorkerPlugin</string>
<!--
Panel size: 380×620.
- 380 wide matches 看盘侠 — consistent feel across plugins.
- 620 tall = 40pt notch reservation + 580pt of card content
(top bar + 5-tab pill strip + active tab body + footer).
-->
<key>MioPluginPreferredWidth</key>
<integer>380</integer>
<key>MioPluginPreferredHeight</key>
<integer>620</integer>
</dict>
</plist>