Skip to content

Instantly share code, notes, and snippets.

@detherminal
Last active May 29, 2024 08:16
Show Gist options
  • Save detherminal/1845c794ee3f3cdcc4e7eb713e9ee6fd to your computer and use it in GitHub Desktop.
Save detherminal/1845c794ee3f3cdcc4e7eb713e9ee6fd to your computer and use it in GitHub Desktop.
Brave Browser Wayland Two (2) Finger Touchpad Gesture Swipe History Back And Forth Enabling
# To add two-finger gesture to back and forth swiping, follow this steps with shell
# 1 - Open .desktop file with nano
sudo nano /usr/share/applications/brave-browser.desktop
# 2 - Move to a little bottom, edit the place where it is `Exec=` to match this
Exec=/usr/bin/brave-browser-stable %U --ozone-platform=wayland --enable-features=TouchpadOverscrollHistoryNavigation
# Use `Ctrl-O` to write and `Ctrl-X` to exit
# Now restart the brave browser and you will be able to swipe back and forth with two-finger touchpad gestures.
@brootware
Copy link

Thank you for this! Been searching online to enable this everywhere and this config worked. I've also made it in to ansible task for repeatability.

- name: Replace line in brave-browser.desktop file to enable 2 fingers swipe back and forth gesture. https://gist.github.com/detherminal/1845c794ee3f3cdcc4e7eb713e9ee6fd
      lineinfile:
        path: /usr/share/applications/brave-browser.desktop
        regexp: '^Exec=/usr/bin/brave-browser-stable %U$'
        line: 'Exec=/usr/bin/brave-browser-stable %U --ozone-platform=wayland --enable-features=TouchpadOverscrollHistoryNavigation'
      become: true

source - https://github.com/brootware/dotfiles/blob/ccf37586f8772aede72e9f0765e0f584fe3e162f/dotbootstrap/rpm_linux_setup.yml#L128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment