mirror of
https://github.com/toothbrush/debounce-mac.git
synced 2024-09-11 05:15:45 +03:00
Add auto-launch instructions. Fixes #2.
This commit is contained in:
parent
4d87ac4e8e
commit
5a8fd56e9d
44
README.md
44
README.md
@ -26,6 +26,50 @@ $ sudo ./debounce
|
||||
|
||||
It needs root because it intercepts keystrokes.
|
||||
|
||||
If you really want, you can "install" it. Assuming that
|
||||
`/usr/local/bin` is in your `$PATH` (which it is if you use Homebrew)
|
||||
you can:
|
||||
|
||||
```ShellSession
|
||||
$ make install
|
||||
```
|
||||
|
||||
### Auto-start at login
|
||||
|
||||
Another [helpful
|
||||
contribution](https://github.com/toothbrush/debounce-mac/issues/2),
|
||||
this time from @cpouldev. If you'd like to auto-start `debounce` at
|
||||
login, you might find something like the [included LaunchAgent
|
||||
configuration](./com.debounceMac.app.plist) helpful.
|
||||
|
||||
Put that somewhere `launchctl` can find it, like
|
||||
`~/Library/LaunchAgents/com.debounceMac.app.plist`, then load the
|
||||
configuration. macOS will automatically prompt you to give `debounce`
|
||||
Accessibility access, this is needed to be able to intercept and
|
||||
modify keystrokes.
|
||||
|
||||
```ShellSession
|
||||
$ launchctl load ~/Library/LaunchAgents/com.debounceMac.app.plist
|
||||
```
|
||||
|
||||
macOS will automatically prompt you to give `debounce` Accessibility
|
||||
access, this is needed to be able to intercept and modify keystrokes.
|
||||
When that's done, start it.
|
||||
|
||||
```ShellSession
|
||||
$ launchctl start com.debounceMac.app
|
||||
```
|
||||
|
||||
To remove / uninstall completely:
|
||||
|
||||
```ShellSession
|
||||
$ launchctl stop com.debounceMac.app
|
||||
$ launchctl unload ~/Library/LaunchAgents/com.debounceMac.app.plist
|
||||
$ rm ~/Library/LaunchAgents/com.debounceMac.app.plist
|
||||
$ launchctl list
|
||||
$ rm /usr/local/bin/debounce
|
||||
```
|
||||
|
||||
### Accessibility / permissions
|
||||
|
||||
You might get an error something like the following, even when running
|
||||
|
24
com.debounceMac.app.plist
Normal file
24
com.debounceMac.app.plist
Normal file
@ -0,0 +1,24 @@
|
||||
<?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>EnvironmentVariables</key>
|
||||
<dict>
|
||||
<key>PATH</key>
|
||||
<string>/usr/local/bin</string>
|
||||
</dict>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Label</key>
|
||||
<string>com.debounceMac.app</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/usr/local/bin/debounce</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue
Block a user