And, more generally, how can I change accessibility settings via the command line?
Worth pointing out that I'm pretty comfortable with bash already- coming from a systems administration / *nix background- but I just don't know which files to edit or tools to use.
To clarify, I am not asking this question, the resolution of which modifies a setting under Security and Privacy. What I want to do is change a setting directly under Accessibility. I'll grant the title of that question is misleadingly similar, but the content is entirely divorced from my intent.
Best Answer
If it's okay to give
Terminal.app
permanent access toAccessibility
:System Preferences
Security & Privacy
sectionPrivacy
tab, click on the lock in bottom left and enter your password to enable editingAccessibility
from left side list and then checkTerminal
checkbox in right side list (if there is noTerminal
checkbox here you might run step 5 once and then back to this step)Open
Terminal
and run this line (it uses AppleScript):repeating previous steps for the future is not needed.
If it's not okay to give direct access:
System Preferences
Keyboard
sectionShortcuts
tab, SelectAccessibility
from left side list and then checkInvert colors
in right side list (Default shortcut isctrl
+alt
+cmd
+8
).Open
Terminal
and run this line (it uses AppleScript):repeating previous steps for the future is not needed.
You can write those codes in external script files and run with
osascript invertColors.scpt