
Show HN: A simple GUI app to make Linux touchpad gestures easier - cunidev
https://gitlab.com/cunidev/gestures
======
bipson
I was hoping to see MacOS style three-finger drag being available through
this. Unfortunately, it will technically most certainly not be possible to
augment it this way, and the maintainer of libinput considers three-finger
drag as a luxury that will introduce unnecessary overhead and complexity.

Three-finger drag is IMO one of the most helpful usability features of MacOS,
and I miss it dearly every day since I bought my XPS 13.

Edit: ... which is not the fault of the developer of this tool. Good job, I
like the spirit and think this is incredibly useful and powerful.

The tool could further make configuration of the most common use cases simpler
IMO. Not every user is keen or able to enter the specific commands.

~~~
cunidev
Thanks! I'm also on an XPS 13, and also an ex-Mac user who misses the trackpad
stuff, so I know how you feel. Not only knowing commands but especially
playing with dbus is unfortunately something for _very_ advanced users only,
so my idea was to build some sort of "DB" for common dbus commands that act on
DEs, say, to open Budgie Desktop's notifications menu, plus an assisted GUI
configuration that generates commands for keyboard shortcuts (xdotool or
something), workspace actions (move, add...) and an "Open app" selection
dialog. That's gonna take a long while though :(

~~~
solarkraft
> so my idea was to build some sort of "DB" for common dbus commands that act
> on DEs

This is great, where is the information you currently have and how can I
contribute? I find that DB to be pretty important for this tool.

~~~
cunidev
I've created something temporary here, feel free to add anything :)

[https://gitlab.com/cunidev/gestures/wikis/desktop-
specific-c...](https://gitlab.com/cunidev/gestures/wikis/desktop-specific-
commands)

------
curt15
Nice. However the biggest limitation (which is no fault of this app) is that
the gestures simply trigger commands upon their completion, with no
intermediate feedback. What would it take to implement animations that follow
gestures in progress like how macOS's change workspace animation continuously
tracks one's fingers during the swipe?

~~~
Un1corn
I haven't tried it yet myself but it seems that in GNOME 3 there is an
animation for the workspace touchpad gesture.

[0]
[https://www.reddit.com/r/gnome/comments/9hsw0p/nice_touchpad...](https://www.reddit.com/r/gnome/comments/9hsw0p/nice_touchpad_gestures_improvement_in_gnome_330/)

~~~
cunidev
Wasn't aware of this, thanks for reporting! I wonder why they didn't put this
in their official 3.30 changelog, it's quite a big change. I seriously doubt
this will be exposed through dbus or anyhow customizable, but it's a huge step
forward anyway.

[https://gitlab.gnome.org/GNOME/gnome-
shell/commit/ebe6f59d7e...](https://gitlab.gnome.org/GNOME/gnome-
shell/commit/ebe6f59d7e3c3b520b5d52ddf39be6a64ec3f80b)

------
Jenz
Haven’t tried this yet (am away). But it looks like just what I have been
looking for, thanks!

~~~
cunidev
You're welcome! As it's still quite new, you'll need to install it manually in
most distros given that it's only present in Solus official repos ATM, and
Flatpak/Snap sandboxing would probably not allow even its most basic usage. If
some Arch user managed to add it to the AUR that'd likely help, now the
install process has to be done from terminal which, though common with Linux
software and just a copy-paste from the Gitlab page, isn't exactly what a
"newbie" would love.

~~~
Vinnl
I'm not sure about FlatPaks, but at least Snaps have a "classic" confinement
mode which removes all restrictions:
[https://docs.snapcraft.io/reference/confinement](https://docs.snapcraft.io/reference/confinement)

(Also: a Snap would be great!)

~~~
cunidev
Good to hear, thanks!

------
insomniacity
Can you explain a little bit more about this? This allows me to add arbitrary
gestures (within the confines of swipe/pinch, 2/3/4 fingers etc) that trigger
command line commands?

Does it work with all touchpads?

What are some commands I might be interested in configuring?

~~~
cunidev
> This allows me to add arbitrary gestures (within the confines of
> swipe/pinch, 2/3/4 fingers etc) that trigger command line commands?

Exactly.

> Does it work with all touchpads?

All libinput-supported touchpads (see:
[https://wiki.archlinux.org/index.php/Libinput](https://wiki.archlinux.org/index.php/Libinput)).
There's more on this on the GitHub page for libinput-gestures, the CLI tool
Gestures is based on: [https://github.com/bulletmark/libinput-
gestures](https://github.com/bulletmark/libinput-gestures)

> What are some commands I might be interested in configuring?

I'm personally using it to replicate (more or less successfully) the macOS
gestures I missed when switching to Linux. For example: \- swipe left/right to
switch workspace \- swipe down to trigger the Budgie Desktop run dialog \-
swipe left/right to open and close notifications \- pinch in/out to zoom in or
out (mapping it to the Ctrl/ +- shortcuts) This (5-second) video gives some
very basic examples:
[https://www.youtube.com/watch?v=SfJ59kTcJjM](https://www.youtube.com/watch?v=SfJ59kTcJjM)

Direct keyboard shortcuts aren't unfortunately available in Wayland ATM, given
its design limitations for security reasons. Workarounds will come (virtual
keyboard drivers perhaps?), but there's nothing like that AFAIK. Luckily,
apart from zoom, I was able to do basically anything in Wayland too playing
with wmctrl and dbus-send

Edit: formatting

~~~
goerz
Do most laptops that people currently get to run Linux, like the Dell XPS or
the Thinkpad X1 have a touchpad that support multi-finger-gestures that could
be configured with this? If I ever were to switch from a MacBook to a Linux
machine, I’d definitely be very interested in having the equivalent of
BetterTouchTool for custom gestures in applications (assuming the hardware
supports it)

~~~
cunidev
Every modern touchpad supports it AFAIK, not sure about the cheap Chinese ones
but I got it working on 6/6 of my tested hardware (a Macbook Pro 2013 (?), an
old Macbook 2009 white, my XPS 13 2018, an ASUS with a somewhat bad supported
"ELAN" touchpad, a Dell XPS 15 2017 and a Lenovo Thinkpad)

~~~
goerz
Thanks! That’s good to know!

------
bayesian_horse
This may have been a lot easier using Jupyter widgets. Or Bokeh. Or Kivy.

In the future I hope we will get some kind of usable Python runtime for
Webassembly, implementing or interfacing to something like React or vuejs.

But currently that kind of runtime would be a rather big download...

~~~
solarkraft
what (would have been easier?)

~~~
bayesian_horse
Making a simple GUI which updates dynamically. Either in the browser through
jupyter widgets and/or Bokeh plotting, or everywhere else through kivy.

~~~
solarkraft
I like Kivy. Jupyter is nice. But ... why would you ever use either for an app
a goal of which is to feel native to the GNOME environment, that doesn't need
to be cross-platform or do any 'dynamic updating' and _does_ need access to
system APIs?

???

At first I thought you were a bot making up weird tangentially-related coments
through markov chaining or something, after having found your twitter page
(good jokes!) I think you have some prety weird ideas or are trolling. Right
tool for the job and such.

