Trackman Marble with xset

July 29, 2017

The Trackman Marble is a great mouse I've been using for over a decade now. By default on linux / within X, scrolling funcionality doesnt not work. Instead, by default the small mouse buttons act as browser forward/back. Because, I've had to set this up so many times with Xorg's /etc/X11/Xorg.conf, and that feels very 2005 at this point, I've moved over to a small userland script.

Using xset w/ libinput I've found is the most pain-free solution to set the mouse to your liking. For my purposes, really all I wanted was to hold down the left small button in order to access a scroll modifier. So you hold the button and then you can use the trackball for scrolling. Well, that's enough blathering, here's the script I use1:

#!/usr/bin/env bash
xinput set-prop "Logitech USB Trackball" "libinput Scroll Method Enabled" "0" "0" "1"
xinput set-prop "Logitech USB Trackball" "libinput Horizontal Scroll Enabled" "0"
xinput set-prop "Logitech USB Trackball" "libinput Drag Lock Buttons" "8"
xinput set-prop "Logitech USB Trackball" "libinput Button Scrolling Button" "8"
  1. Make sure to install xset and libinput