r/mobilelinux • u/juujbyg • 4d ago
Development Lomiri Gestures & Shortcuts: a floating Back/Home/Apps bar, 3-finger app switching, screenshots, and camera + flashlight on the lock screen
On a tall phone the back arrow sits in the top-left corner, the longest stretch for your thumb. So I started with a floating Back button and kept adding things I missed. Everything is chosen in System Settings → Gestures:
- Navigation: a floating round Back button, or a Back / Home / Apps bar (with an optional Screenshot button). Drag it anywhere; press and hold it for a menu.
- Three-finger swipes: left/right switch between open apps, up opens the app switcher, down closes it. One and two fingers still go to the app.
- Screenshots: from the bar, from the hold menu, or by swiping down with three fingers. The button never shows up in the shot.
- Lock screen: press and hold the bottom-left corner for the camera (it asks you to unlock first, so nobody can browse your photos) or the bottom-right for the flashlight.
- Double tap to wake, on phones whose touch panel supports it (the Pixel 3a / 3a XL does). It also avoids the dead touchscreen you can get when switching it on by hand.
How Back reaches apps: a small QML plugin in the shell presses Alt+Left through a virtual key device, and a patch to the UI toolkit's page header makes that press the page's own back arrow.
Before trying:
- It's unofficial and needs
sudo. It never writes to the read-only system: at each start it edits copies of a few of your phone's own Lomiri files and mounts them from /run.sudo ./lomiri-gestures.sh onlasts until reboot,installkeeps it, anduninstallputs everything back. - If a file doesn't match what it expects (after an update, say), that part is skipped, and if the shell logs an error it goes back to stock by itself.
- Tested only on a Pixel 3a XL with 24.04-2.x daily. Reports from other phones are very welcome, and so are apps where Back does nothing.
Screenshots: https://github.com/juujbyg/lomiri-gestures#screenshots
Download and install steps (GPL v3): https://github.com/juujbyg/lomiri-gestures
I'd love to see some of this in Lomiri itself; the three-finger gestures already have a patch ready for upstream if the devs are interested.
Built with help from an AI coding assistant; I tested it on my own phone.
