Created
October 18, 2022 17:32
-
-
Save deepakmahakale/36d5e4a09259983f700e9b2a29ab30c9 to your computer and use it in GitHub Desktop.
Bash Script | Apple Script to toggle scroll direction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
osascript <<EOD | |
tell application "System Preferences" | |
(run) | |
set current pane to pane "com.apple.preference.trackpad" | |
end tell | |
tell application "System Events" | |
tell process "System Preferences" | |
delay 0.6 | |
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad" | |
click checkbox 1 of tab group 1 of window "Trackpad" | |
end tell | |
tell application "System Preferences" to quit | |
end tell | |
EOD |
Alternatively, you can use it from the source
curl -s https://gist.githubusercontent.com/deepakmahakale/36d5e4a09259983f700e9b2a29ab30c9/raw/2e871271ff944140ca25efbe3d26b44221faa861/toggle_scroll.sh | bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How To Use
~/toggle_scroll.sh
toggle_scroll.sh
chmod 755 ~/toggle_scroll.sh