Major changes: - Add StyleConfig dataclass with independent color, width, opacity, duration, pulse_speed, sound, and volume per mode (running/completed) - Replace flat flash_*/sound_*/play_on config with running: and completed: YAML sections - Replace CGEventTap (silently fails in forked daemon) with CGEventSourceSecondsSinceLastEventType polling for reliable input-based pulse dismissal when Cursor is already frontmost - Update overlay, sound, and daemon to pass StyleConfig per call - Rewrite tests for new config shape and dismiss mechanism Made-with: Cursor
1.0 KiB
1.0 KiB
Tweaks: approval filtering + two flash modes
Task
Added tool filtering and differentiated flash behavior for approval vs. completion events.
Changes
config.py: Addedapproval_toolslist (default: Shell, Write, Delete),sound_name/sound_volume,pulse_speedoverlay.py: Two modes —pulse()with sine-wave animation + auto-dismiss when Cursor is focused,flash()for brief single flashdaemon.py: RoutespreToolUseto pulse+sound (filtered by approval_tools),stopto brief flash; stop dismisses active pulsesound.py: Re-added for approval pulse events- Tests: 19 tests covering tool filtering, both flash modes, cooldown, fallback behavior
README.md: Documented both behaviors and config options
Behavior
| Event | Tool in approval_tools? | Action |
|---|---|---|
| preToolUse | Yes (Shell, Write, Delete) | Pulse border + play sound until user clicks window |
| preToolUse | No (Read, Grep, etc.) | Ignored |
| stop | N/A | Brief single flash |