Hacker News new | ask | show | jobs
by CountSessine 2183 days ago
I’m a long time MBP user who’s switched to Linux on a thinkpad recently, after the butterfly switch debacle.

I think the one gesture I used more than any other on my MBP was the 4-finger swipe left and right to switch workspaces. I would have a fullscreen iterm/tmux/vim session in each workspace - each tmux is a separate project with multiple panes and windows. I can't really bind a keyboard shortcut to switch workspaces because I have so many shortcuts already bound to tmux/vim/coc and other vim extensions, which is why it's so nice to be able to switch workspaces with a touchpad gesture. I could flip back and forth between workspaces effortlessly, without losing precious key shortcuts for development. It’s a fantastic dev setup.

Fedora 32 seems to support this now! I don’t think that F31 did, but on F32 I can do the 4 finger swipe to switch workspaces, and on my thinkpad it works pretty much as smoothly and as interactively as it did on my MBP - swipe slowly and the screen slides following your fingers, change direction in the middle of the gesture and the screen slides back - the whole ‘stream input events and the screen is an extension of your fingers’ as you describe.

The Linux desktop is getting a lot better. I don’t think I would ever have switched without Wayland and now they’re getting gestures right.

8 comments

Three finger drag is the killer one for me. Once you're used to it, it's difficult to go back.
Three finger drag is also a killer feature for me, and unfortunately that very feature highlights a key difference in the way macOS and the Linux desktop are developed [1].

To get three-finger drag to work, you need a gesture right? So you report the issue to libinput. Libinput looks at it and says "well, this is more than just a gesture", and says "this should be implemented in the compositor". Now, this is desktop Linux, and now you need to get at least three compositor projects to agree that 1) yes it's their problem, it isn't a libinput problem and 2) to actually fix it in their compositor. Sigh. And what's more - this isn't even the end of the problem! This is just for dragging windows! Now you also need to get this for arbitrary drag and drop actions like moving text or stuff in your file manager, so now you also need fixes in your UI toolkits. There's at least two for that you'll need as well. Pile on top there that most maintainers in this web have never extensively used a Mac, and don't even understand why this is something people want in the first place. This kind of stuff is very hard to fix on the free desktop.

If the same discussion happens for macOS, at worst some manager who is the boss of both of the squabbling teams will get mad, tells them that the UX here is more important than your technical squabbles and orders them to sit down and fix it. To be clear: I completely understand how these layers of abstraction work on the free desktop, and this is much harder to fix. But I sure wish there was a stronger incentive for these abstraction layers to fix these cross cutting concerns.

I have some hopes pinned on recent progress for this [2].

[1]: https://bugs.freedesktop.org/show_bug.cgi?id=89999#c20

[2]: https://gitlab.freedesktop.org/libinput/libinput/-/issues/29...

I think a lot of this is especially bad right now because we're trying to unwind a lot of the bad system architecture that was imposed by X. A lot of maintainers are finding that they need to do things themselves that X used to do for them.

There are other issues on the horizon - if input preferences are no longer held in X (because that's not libinput's job and it shouldn't be) but are pushed up to gtk/glib/qt/kde, does that mean that whenever I use a kde app in gnome that it uses some random key-shortcut defaults rather than what's in my gsettings? That seems to be the case right now.

Also, I owned a multitude of MBPs through the years, from the first Intel Al-books around 2005 through to my last MBP, a 2015 model. I was heavily invested in the platform because it seemed like that manager you describe had the same sense of taste and the same engineering intuitions as I do. Well, that all ended with the butterfly-switch keyboard. It was a sad, angry, bitter divorce, but I left Apple and will probably never buy another MBP. The butterfly switches are gone, but I know now that that manager lacks the integrity and professionalism to manage the platform. It was more important to fluff Johnny Ive's ego.

That opinionated manager can giveth, and she can taketh away.

> If the same discussion happens on macOS, at worst some manager who is the boss of both of the squabbling teams will get mad, tells them that the UX here is more important than your technical squabbles and orders them to sit down and fix it.

That strikes me as rather optimistic. I mean, yes, in theory a company does have enough overarching management that it can force coherent action, but... the "Microsoft" in https://laughingsquid.com/organizational-charts-for-tech-com... is a thing. Maybe Apple is still sufficiently centrally-driven that it works there? Historical accounts certainly make it seem like they've managed their share of infighting, but I suppose by the time they went to market it tended to be dealt with.

Apple has had consistent three finger drag since what, 2012? At least from this perspective they seem to be doing alright.
Agreed. It strikes me as odd that Apple hides this ability deep in the Accessibility settings.
It wasn't always relegated there, and had a more prominent place right in the trackpad settings.

Probably related: right around when the setting was moved deep into accessibility, Finder started having issues with three-finger drag.

Because it changes the gestures for workspace switching / expose. They are no longer three-finger, but four-finger, thus more difficult.

I'm in the group that gladly foregoes three finger drag, if it means we get to keep other three finger gestures.

When did switching workspaces become four-finger? Meaning you can't use the three-finger option? Catalina? I have a MacBook Pro on Mojave and the trackpad accepts three-finger for the gesture of switching workspaces and the Magic Mouse has an option for two-finger.
When you enable three finger drag, all the other gestures will switch to four finger.

Disabling the tree finger drag is not enough to return everything back, you have to configure that in separate control panel.

Might just be that most general users don't have a need for that?
Same here. When I first saw that feature 2014 on my MBP back then I thought Linux will have that soon. Man was I wrong....But actually it should work, as I can e.g. tap 3 fingers on a link now here on a XPS to open it in a new tab.
I used it for a while and once again I keep everything on one screen and use command tab. It isn't difficult to go back.
It's not just moving windows around. It's all drag operations. Highlighting text in a webpage or console, dragging files between finder and other apps, dragging UI controls like sliders.
Isn't it 3 finger?

As someone who installed Linux on a computer for the first time 22 years ago (Slackware via floppies!), but have never used it full time for more than a few days before I'd jump back to Windows/Mac, I'm amazed more every year how "we're almost there" is a recurring theme.

It's a dropdown in Preferences. I have mine set to 3 fingers because my pinky is short compared to my other fingers. My wife has hers set to 4 fingers.

I forget which is the default.

I don't recall changing it when I got a new machine in December, but with so much stored in iCloud, I'm uncertain if that's default or not.
I'm amazed more every years how "we're almost there" is a recurring theme.

Yeah, but I think a lot of that was because so much dev effort has been wasted trying to make X11 suck less, and building infrastructure around X11. Between Wayland, libinput, and freedesktop, it feels like we're finally moving forward.

I don't think that the linux desktop will ever be 'mainstream' - there are too many issues with commercial software - but at least it can be a pleasant experience for the technically-inclined.

The 4-finger swipe is responsible for a huge number of family tech support calls. "Dad, all my windows are gone again!". Pretty much a constant theme.
Imagine if there was an undo buffer for OS events and one could just say, "reset workspace" and boom, everything is fixed. PriorArt.
Why not turn it off for them then?
It turns out that kids like to go into settings and click every button and change every thing. I don't really mind. I pretend they are learning something about computers.
They are! They’re exploring and being curious. This is one of the most important things to encourage. I’m so thankful my parents let me disassemble the VCR, computers, other people’s computers, etc. I did end up learning a lot and the curiosity has served me well.
I do this so much I just assign Ctrl+1/2/3/4 to switch instantly to desktops so I'm not having to move my hands so much.
I have implemented that gesture in Wayfire last year :) but yeah GNOME already had it for quite some time. KDE Plasma too, I think.
As someone who used MacBook for ~5 years I miss touchpad especially for switching between workspaces.

The closest alternative (for me) on Ubuntu (Gnome) I've come up with is Super+J/K for switching between workspaces and, as a bonus, moving windows between workspaces with Super+Shift+J/K. Feels almost as productive as on MacBook with touchpad

Have you tried this? https://github.com/bulletmark/libinput-gestures

I'm using three fingers swap for switching between workspaces. But I agree with the comment above, the animation is key.

If you use Wayland on Ubuntu (Gnome), the exact gesture you're talking about already exists, it's just vertical instead of horizontal. It's actually my most used gesture personally.
It worked on Fedora 31, but they did noticeably improvment in F32. If you are fun of Wayland I recommend to check Sway.
As someone using sway on Arch, is there a way to get these gestures? Or is it something specific to Fedora?
Should be control arrow key left or right if I remember correctly