Hello,

I have an old macbook pro 2012. With Apple dropping all support for it, I want to run Linux on it. The caveat is - Im looking for the same feel as the experience with the macbook trackpad and keyboard.

I’ve tried a few different OS’s on it, and each time, it runs as how you would expect. No issues with installation or anything, and most issues have a small or easy fix.

Being used to old habits with that laptop, I haven’t had good luck with remapping things to give it it’s old feel again.

By feel, I mean things like mapping trackpad gestures, some of the “function row” to map the same things as they keyboard has them, remapping some hotkeys to make use of the command button, etc.

I was wondering if there was an OS that has a lot of the things like mouse gestures, or the keyboard mappings of those laptops already built into it.

  • 🧟‍♂️ Cadaver
    link
    fedilink
    511 months ago

    libinput-gestures IS a game changer.

    Please note that if you are using KDE wayland, some defaults are set and cannot be overriden, which is frustrating. You might have to use X11 session instead.

    If you really want to use wayland, libinput-gestures will not work with ‘xdotool’ and most of the other gestures reader will be slow. In that case, you might want to use a program called evemu. It’s not… intuitive.

    If you need help on this, don’t hesitate to reply to this message. I’ll gladly help. Not so long ago I was walking in your shoes.

    • @Miimikko@lemmy.world
      link
      fedilink
      3
      edit-2
      11 months ago

      I could use some help with this. Using KDE Wayland and currently almost happy with the gestures that come out of the box (but I think I was able to change 4 finger left/right virtual desktop switch to 3 fingers, don’t remember how I did it…).

      One thing I am missing though is being able to map Meta + W (the virtual desktop “collection” screen) to 3 finger swipe up. Any idea how this could be accomplished?

      • 🧟‍♂️ Cadaver
        link
        fedilink
        311 months ago

        If you use KDE with wayland, then :

        • You can switch desktops horizontally with three or four fingers
        • You can only switch desktops vertically with three fingers
        • By default, four fingers vertical opens present windows or something like that

        To be able to use four fingers swipe up, you need to disable present windows first. Go to settings > workspace behaviour > desktop effects and unclick desktop grid and present windows (in the hope that you have no use for them)

        Then you need to install evemu and libinput-gestures (if you’re on Arch, it’s in the pacman repo and the AUR respectively)

        Once you have it installed, run in your terminal evemu-record. It will list all of your devices. Shut down the program with Ctrl + C and look at the event for your keyboard. Once this is done note it down.

        Create a new file

        nano sendkey.sh

        Copy the content of this code in the new file but replace EVDEVICE=/dev/input/event4 with your keyboard.

        #!/bin/bash
        # sendkey.sh
        
        EVDEVICE=/dev/input/event4
        
        for key in $@; do
            evemu-event $EVDEVICE --type EV_KEY --code KEY_$key --value 1 --sync
        done
        
        
        # reverse order
        for key in $@; do
            evemu-event $EVDEVICE --type EV_KEY --code KEY_$key --value 0 --sync
        done
        

        Ctrl +O then CTRL + X to save then quit nano. Once it is done run this command : chmod +x sendkey.sh then open the gestures app and start mapping away. The interface is very intuitive. What you want to do is click on the little + at the top bar then select the motion you want to bind (in your case swipe + up + 4 fingers) and in the command at the bottom you write /home/YOURUSERNAME/sendkey.sh LEFTMETA W

        And there it is. You can map pretty any keybind to any event with this. Hope this helps.

        • @Miimikko@lemmy.world
          link
          fedilink
          211 months ago

          This is so goddamn great that I won’t even make the obligatory vim/nano joke, seriously, thank you a bunch!

          Made a little modification to sendkey.sh as the /dev/input/event numbers change on boot:

          EVENTNUMBER=$(ls -lah /dev/input/by-path/pci-0000:00:14.0-usbv2-0:5:1.0-event-kbd |awk ‘{sub(“…/”, “”, $11); print $11}’)

          EVDEVICE=/dev/input/$EVENTNUMBER