Skip to content

Instantly share code, notes, and snippets.

@Cat7373
Created January 28, 2023 01:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cat7373/5f2997d1a7278e480d2b7d12b969545b to your computer and use it in GitHub Desktop.
Save Cat7373/5f2997d1a7278e480d2b7d12b969545b to your computer and use it in GitHub Desktop.
Mac fix zoom
killall Dock
killall Finder
#!/bin/bash
osascript <<EOD
use AppleScript version "2.8"
use framework "Foundation"
tell application "System Settings"
if it is running then
quit
delay 0.6
end if
end tell
current application's NSWorkspace's sharedWorkspace()'s openURL:(current application's NSURL's URLWithString:"x-apple.systempreferences:com.apple.preference.trackpad")
tell application "System Settings"
activate
delay 0.8
end tell
tell application "System Events"
tell tab group 1 of group 1 of group 2 of splitter group 1 of group 1 of window of application process "System Settings"
click radio button 2
delay 0.6
end tell
tell group 1 of scroll area 1 of group of group 2 of splitter group 1 of group 1 of window of application process "System Settings"
click checkbox "Zoom in or out"
delay 0.5
click checkbox "Zoom in or out"
delay 0.1
end tell
end tell
quit application "System Settings"
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment