Skip to content

hmishra2250/ubuntu-maclike-touchpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ubuntu Mac-Like Touchpad

macOS-like touchpad gestures for Ubuntu 24.04 GNOME on X11 using Fusuma and xdotool.

This setup is aimed at people who want Linux touchpad behavior closer to macOS, especially:

  • three-finger drag
  • four-finger workspace switching
  • two-finger pinch zoom
  • normal GNOME tap/click/scroll behavior left intact

Tested Environment

This repo reflects a working setup on:

  • Ubuntu 24.04.4 LTS
  • GNOME on X11
  • fusuma 3.7.0
  • libinput 1.25.0
  • xdotool 3.20160805.1

Touchpad hardware on the original machine:

  • MSNB0001:00 04CA:2642 Touchpad
  • event node: /dev/input/event4

The event node is hardware-specific. You should verify yours with:

libinput list-devices

What This Repo Contains

Why This Exists

The default Linux touchpad stack can get close to macOS for scrolling and taps, but three-finger drag usually needs custom gesture tooling.

The main bug fixed in this setup was drag jitter. A naive drag helper rounds each tiny gesture delta immediately. That creates visible stutter:

  • small movements get rounded to 0
  • pointer motion pauses briefly
  • the cursor jumps once enough movement accumulates

The helper in this repo stores the fractional remainder between updates and only emits integer pointer motion once enough real movement has accumulated. That makes three-finger drag much closer to normal click-and-drag smoothness.

Install Overview

  1. Install dependencies.
  2. Add your user to the input group.
  3. Apply the GNOME touchpad settings.
  4. Copy the repo files into the expected paths.
  5. Start fusuma.

Detailed commands are included below.

Dependencies

sudo apt update
sudo apt install -y libinput-tools ruby ruby-dev xdotool
sudo gem install fusuma

Add your user to the input group:

sudo gpasswd -a "$USER" input

Log out and back in after that group change.

GNOME Settings

gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true
gsettings set org.gnome.desktop.peripherals.touchpad click-method 'fingers'
gsettings set org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true
gsettings set org.gnome.desktop.peripherals.touchpad tap-and-drag true
gsettings set org.gnome.desktop.peripherals.touchpad tap-and-drag-lock false

File Placement

Copy the files into place:

mkdir -p ~/.config/fusuma ~/.config/autostart ~/.local/bin
cp fusuma/config.yml ~/.config/fusuma/config.yml
cp scripts/fusuma-drag-lock.sh ~/.local/bin/fusuma-drag-lock
cp autostart/fusuma.desktop ~/.config/autostart/fusuma.desktop
chmod +x ~/.local/bin/fusuma-drag-lock

If your touchpad is not /dev/input/event4, override it before starting Fusuma:

export FUSUMA_DRAG_LOCK_DEVICE=/dev/input/eventX

Start Or Restart Fusuma

pkill -x -f fusuma || true
nohup fusuma -d >/tmp/fusuma.log 2>&1 &

To load it automatically on login, keep the desktop file in:

~/.config/autostart/fusuma.desktop

Current Local GNOME Values

These were the relevant GNOME touchpad values on the original working machine:

org.gnome.desktop.peripherals.touchpad click-method 'fingers'
org.gnome.desktop.peripherals.touchpad natural-scroll true
org.gnome.desktop.peripherals.touchpad tap-and-drag true
org.gnome.desktop.peripherals.touchpad tap-and-drag-lock false
org.gnome.desktop.peripherals.touchpad tap-to-click true
org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true

Notes

  • This repo is for X11. The drag path depends on xdotool, so this is not the right approach for a pure Wayland session.
  • If drag feels too fast or too slow, tune interval, accel, and threshold in fusuma/config.yml.
  • If gestures do not trigger at all, confirm that your user is in the input group and that fusuma can read libinput gesture events.

About

macOS-like touchpad gestures on Ubuntu GNOME X11 using Fusuma and xdotool

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages