A minimal GNOME Shell extension that adds a Touchpad Mode tile to the Quick Settings panel. One tap to start TouchpadEmulator, one tap to stop. Useful on Linux phones (postmarketOS, Mobian) where you want trackpad-style cursor input from a quick-settings toggle instead of hunting for the app icon.
TouchpadEmulator ships with a .desktop launcher, but on a phone it's faster to flip it from the same pulldown as Wi-Fi and brightness. Tapping the tile spawns the binary directly and tracks its lifecycle — no polling, no pkill scanning, no shell launcher.
- GNOME Shell 45 – 50 (tested on 50.1).
touchpad-emulatorinstalled and/usr/bin/TouchpadEmulatoron$PATH./dev/uinputand/dev/input/event*accessible to your user (the upstreamtouchpad-emulatorpackage ships a udev rule for this).
On postmarketOS:
sudo apk add touchpad-emulatorgit clone https://github.com/asidko/gnome-touchpad-emulator-toggle.git \
~/.local/share/gnome-shell/extensions/touchpad-emulator@localLog out and log back in (Wayland — extensions can't be loaded into a running session), then enable:
gnome-extensions enable touchpad-emulator@localThe tile appears in Quick Settings as Touchpad Mode.
- Spawns
/usr/bin/TouchpadEmulatordirectly viaGio.Subprocess.wait_asyncon the child is the single source of truth for tile state — if the process exits for any reason, the tile auto-greys. - Stop sends
SIGTERMto the held subprocess handle, so there's nopkillscanning and no chance of killing the wrong process. - A one-shot
pgrepat startup adopts any TouchpadEmulator started outside the tile (e.g. autostart); for that case only, stop falls back topkill -f.
- TouchpadEmulator claims
iio-sensor-proxyfor its own screen-rotation feature. GNOME's auto-rotate quick-setting will disappear while the emulator is running and reappear on stop. This is expected — only one process can claim the accelerometer at a time. - Alpine's
killall/pkill -xsilently fail to match process names longer than 15 characters (kernelcommtruncation). The shippedLaunchTouchpadEmulator.shhits this bug; this extension avoids it by spawning the binary directly and matching withpkill -f.
gnome-extensions disable touchpad-emulator@local
rm -rf ~/.local/share/gnome-shell/extensions/touchpad-emulator@localMIT
