Instructions for extra touchpad gestures
#1
If you would like to have page back and page forward gestures (swipe left and right with THREE fingers), pinch to zoom in and out, quickly switch workspaces and more on your Pinebook Pro, look no further! This is how I got mine set up.



BTW I am using Manjaro KDE (Default Debian tutorial below!!!), if you are using something else, YMMV.



Download xdotool

Code:
sudo pacman -S xdotool




Enable AUR and download libinput-gestures



Code:
sudo pacman -S libinput-gestures
make your users config settings file based off the default



Code:
cp /etc/libinput-gestures.conf ~/.config/
Start it up!



Code:
libinput-gestures-setup start
if you want to have it start on every boot.



Code:
libinput-gestures-setup autostart
Enjoy your new fancy three finger swipes to move back and forth between webpages. The config file is very customizable so feel free to get creative. 



EDIT:

If you would also like the ability to switch between workspaces (desktops) with a four finger swipe, jump to beginning and end of webpage, and pinch to zoom in and out, here is the edit:



Code:
# Jump to the beginning of a webpage (three fingers)
gesture swipe down      xdotool key Home

# Jump to the end of a webpage (three fingers)
gesture swipe up        xdotool key End

# Workspace/desktop switch (four fingers)
gesture swipe left      4 _internal ws_up

# Workspace/desktop switch (four fingers)
gesture swipe right     4 _internal ws_down

###############################################################################
# PINCH GESTURES:
###############################################################################

# zoom in
gesture pinch in        xdotool key ctrl+minus

# zoom out
gesture pinch out       xdotool key ctrl+plus


NOTE: the Manjaro ARM KDE image does not have virtual desktops set up by default, you will have to add a second one yourself:

Virtual Desktops -> Add -> edit your new desktop to say 'Desktop 2'. you should now see Desktop 1 and 2 in the list.





DEFAULT DEBIAN TUTORIAL:



Install Dependencies

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xdotool wmctrl
sudo apt-get install libinput-tools




We are going to have to build it ourselves



Code:
git clone https://github.com/bulletmark/libinput-gestures.git
cd libinput-gestures/
sudo make install




Add this to ~/.config/libinput-gestures.conf (you will have to create this file yourself)



Code:
# Configuration file for libinput-gestures on Pinebook Pro.
# clover, Dec 2019
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# NOTE: This configuration works on Manjaro KDE/Plasma and Debian + MATE if you are using something else YMMV

###############################################################################
# SWIPE GESTURES:
###############################################################################
# Jump to the beginning of a webpage (three fingers)
gesture swipe down      xdotool key Home

# Jump to the end of a webpage (three fingers)
gesture swipe up        xdotool key End

# Browser go forward (three fingers)
gesture swipe left      3 xdotool key alt+Right

# Browser go back (three fingers)
gesture swipe right     3 xdotool key alt+Left

# Workspace/desktop switch (four fingers)
gesture swipe left      4 _internal ws_up

# Workspace/desktop switch (four fingers)
gesture swipe right     4 _internal ws_down

###############################################################################
# PINCH GESTURES:
###############################################################################

# zoom in
gesture pinch in        xdotool key ctrl+minus

# zoom out
gesture pinch out       xdotool key ctrl+plus





add user to the input group:
Code:
sudo adduser clover input




If you want it to start on every boot create systemd file

Code:
sudo touch /etc/systemd/system/gestures.service


add this to gestures.service:

Code:
[Unit]
Description=gestures

[Service]
User=clover
Group=clover
Type=simple
ExecStart=env DISPLAY=:0 /usr/bin/python3 /usr/bin/libinput-gestures




Finally, start and enable

Code:
sudo systemctl enable --now




Thats it!


Messages In This Thread
Instructions for extra touchpad gestures - by clover - 12-27-2019, 11:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Instructions for Installing VS Code on Manjaro clover 6 14,197 06-04-2020, 09:37 PM
Last Post: pfeerick

Forum Jump:


Users browsing this thread: 1 Guest(s)