Introducing longarms
Published on
After years of running MacOS and Windows, I’ve recently had to come back to running Linux (specifically Ubuntu) as my daily driver. The process has been surprisingly painless when compared to my past experiences. Pretty much everything major worked out of the box without much tweaking. Everything except for one small feature, which I use extensively: Multitouch gestures.
The Challenge
The absence of robust swipe gestures was a glaring hiccup in my daily user experience. Enter Fusuma, a promising solution for multi-finger swipes that interfaces with Libinput. While it works well for swipes, the tap plugin is abandoned and limited, and wasn't a great solution as it was limited by Libinput's constraint of only recognizing up to three-finger taps.
Identifying the Gap
Determined to enhance my user experience, I delved into the kernel-level handling of input events. Coming to the understanding that Libinput is a layer over evdev, a generic interface for input events, was a breakthrough. I also learned that it was not evdev that imposed this limitation, but rather Libinput that introduced this constraint.
Crafting a Solution: Introducing longarms
Persistence paid off, leading me to create longarms - my tailored solution to the multitouch tap dilemma. Longarms, a Go application, utilizes Viper for config handling, interfaces with evdev via an existing Go package, and employs a straightforward switch statement to detect events like BTN_TOOL_DOUBLETAP and execute the desired commands.
Longarms is available as a deb package, tar.gz package, or you can opt for the standard Go tooling of go build/go install. All of this is availabe on GitHub.