Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahkohd/e664c9bec4643c48dd59883d97dce4db to your computer and use it in GitHub Desktop.
Save ahkohd/e664c9bec4643c48dd59883d97dce4db to your computer and use it in GitHub Desktop.
Code snippet to disable two-finger swipe gesture for next/previous page navigation for Chromium based browsers on macOS.
# Set your app name - the Chromium Browser (i.e Chrome, Brave) in a variable.
appName="Brave"
# Get the bundle Id of the Chromium Browser, store it in a variable.
bundleID=$(osascript -e 'id of app "'$appName'"')
# Example: Get the bundle Id of Brave browser
# Returns:
# com.brave.Browser
# Now let's set a flag to disable the guesture navigation.
defaults write $bundleID AppleEnableSwipeNavigateWithScrolls -bool FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment