One thing I really missed on my Macbook Pro since I’ve installed Arch is the ability to do a two finger swype to go back and forward a page (it sounds trivial but once you use it you’ll never go back). Problem is, the xf86-input-synaptics-mtpatch package hasn’t been updated in quite a while. The mtpatch won’t install on newer systems. Here’s how to get around it.
First, head over to the AUR website and download the xf86-input-synaptics-mtpatch tarball. Open up your terminal and unpack the tarball.
[brandon@archy Downloads]$ tar -zxf xf86-input-synaptics-mtpatch.tar.gz
Go into the folder and edit the PKGBUILD file and edit the following lines to look like this:
pkgver=1.8.0 makedepends=('xorg-server-devel' 'X-ABI-XINPUT_VERSION=21' 'libxi' 'libx11' 'resourceproto' 'scrnsaverproto') conflicts=('xorg-server<1.14.0' 'X-ABI-XINPUT_VERSION<20' 'X-ABI-XINPUT_VERSION>=21') sha256sums=('9bf27632aaa6c5e62621ca9c2ca00f9b309c85b039ee33cd592b189fc872c37a' '03dcb9d789f54fa1dc7828fd64a8c30345b864f60886a6551877c911a6c0ff1d' 'aad6e00b68a66344f5191a0f020c3e9a021bd32b56ee286769f6fd6525c08f65' )
Run the following code in order to download dependencies and compile the binary files:
[brandon@archy xf86-input-synaptics-mtpatch]$ makepkg -s
Install the new patched synaptic drivers by doing the following:
[brandon@archy xf86-input-synaptics-mtpatch]$ sudo pacman -U xf86-input-synaptics-mtpatch-1.8.0-1-x86_64.pkg.tar.xz
Once it starts installing, if you have the xf86-input-synaptics package installed, it will prompt you to remove it. Choose yes and continue on.
Now it’s time to install touchegg. Hopefully, you have packer installed on your system. If not, google for it and install it.
[brandon@archy ~]$ sudo packer -S touchegg --noconfirm --noedit
Once touchegg is installed, run touchegg real quick to have it create a configuration file in your home directory and then use ^C to abort the process. Now we need to edit the touchegg configuration file to our liking. For some reason, the application name hooks are outdated and don’t include Firefox. So let’s edit the config.
[brandon@archy ~]$ nano ~/.config/touchegg/touchegg.conf
At the bottom of the config file, change the application section to look like the following:
<application name="Chromium, Dolphin, Firefox"> <gesture type="DRAG" fingers="2" direction="LEFT"> <action type="SEND_KEYS">Alt+Right</action> </gesture> <gesture type="DRAG" fingers="2" direction="RIGHT"> <action type="SEND_KEYS">Alt+Left</action> </gesture> </application>
If you noticed, I also changed which direction sends the keys to a more “natural” way.
Caveats: What the xf86-input-synaptics-mtpatch does is just take the original drivers and pass on all two+ finger gestures to the kernel. This means that things like two finger scrolling and two finger taps are handled by touchegg. For me, two finger tapping makes the menu disappear very quickly and two finger scrolling is pretty fast and I haven’t found a way to change it (the configuration option for SPEED under scrolling does nothing for me). Hopefully I will figure this out and have it sorted out soon.