Skip to content

Commit 586a853

Browse files
danielbodartclaude
andcommitted
Exit non-zero on permission denial, throttle restarts to 60s
Permission denied is an error — exit(1) so launchd knows it failed. KeepAlive=true with ThrottleInterval=60 means launchd retries at most once per minute. Combined with the 60s in-binary accessibility poll, the user gets one prompt per ~2 minutes until they grant permission. With the stable binary path, TCC recognises the same app so the prompt only appears once. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4269247 commit 586a853

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

dist/install-macos.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,9 @@ $prog_args </array>
8686
<key>RunAtLoad</key>
8787
<true/>
8888
<key>KeepAlive</key>
89-
<dict>
90-
<key>SuccessfulExit</key>
91-
<false/>
92-
</dict>
89+
<true/>
90+
<key>ThrottleInterval</key>
91+
<integer>60</integer>
9392
<key>StandardOutPath</key>
9493
<string>$INSTALL_DIR/capsper.log</string>
9594
<key>StandardErrorPath</key>

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ pub fn main() !void {
428428
if (builtin.os.tag == .linux) {
429429
std.debug.print("Check: is user in 'input' group? Is /dev/uinput accessible?\n", .{});
430430
}
431-
return;
431+
std.process.exit(1);
432432
};
433433
type_callback = .{
434434
.context = @ptrCast(&input_handler.?),

0 commit comments

Comments
 (0)