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!
#2
(12-27-2019, 11:48 PM)clover Wrote: If you would like to have page back and page forward gestures (swipe left and right with THREE fingers) on your Pinebook Pro, look no further! This is how I got mine set up.

BTW I am using Manjaro KDE, 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,
insert this edit starting line 75:

Code:
# 3 finger Browser go forward (works only for Xorg, and Xwayland clients)
gesture swipe left      3 xdotool key alt+Right
# 4 finger workspace/desktop switch
gesture swipe left      4 xdotool key ctrl+F2
# 3 finger Browser go back (works only for Xorg, and Xwayland clients)
gesture swipe right     3 xdotool key alt+Left
# 4 finger workspace/desktop switch
gesture swipe right     4 xdotool key ctrl+F1

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.


Would you have any idea how to get this working on the default Debian image?  I don't know what repo I would need to get libinput installed.
#3
(01-18-2020, 11:12 AM)appdev46 Wrote:
(12-27-2019, 11:48 PM)clover Wrote: If you would like to have page back and page forward gestures (swipe left and right with THREE fingers) on your Pinebook Pro, look no further! This is how I got mine set up.

BTW I am using Manjaro KDE, 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,
insert this edit starting line 75:

Code:
# 3 finger Browser go forward (works only for Xorg, and Xwayland clients)
gesture swipe left      3 xdotool key alt+Right
# 4 finger workspace/desktop switch
gesture swipe left      4 xdotool key ctrl+F2
# 3 finger Browser go back (works only for Xorg, and Xwayland clients)
gesture swipe right     3 xdotool key alt+Left
# 4 finger workspace/desktop switch
gesture swipe right     4 xdotool key ctrl+F1

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.


Would you have any idea how to get this working on the default Debian image?  I don't know what repo I would need to get libinput installed.
updated original post
#4
This is awesome and should be a tutorial on the PBP wiki! I'll try this right away.
#5
Excellent tutorial, thank you
#6
I might have done something wrong but I had to copy libinput-gestures.desktop to ~/.config/autostart/

I don't understand the dex part but gestures are working now.

I also swapped swipe left and swipe right. Just a personal preference. Smile

Thanks!
#7
I just noticed that gestures no longer work after waking from sleep.

Any suggestions on what could be the issue?
#8
(01-22-2020, 06:09 PM)appdev46 Wrote: I just noticed that gestures no longer work after waking from sleep.  

Any suggestions on what could be the issue?

Please post your output from this command:


Code:
systemctl status gestures
#9
systemctl status gestures
● gestures.service - gestures
Loaded: loaded (/etc/systemd/system/gestures.service; enabled; vendor preset:
enabled)
Active: inactive (dead) since Wed 2020-01-22 20:24:11 CST; 16min ago
Main PID: 360 (code=exited, status=0/SUCCESS)

Jan 22 20:24:11 Debian-Desktop systemd[1]: Started gestures.
Jan 22 20:24:11 Debian-Desktop dex[360]: File does not exist: /home/rock/.config
/autostart/libinput-gestures.desktop
#10
(01-22-2020, 08:42 PM)appdev46 Wrote: systemctl status gestures
● gestures.service - gestures
  Loaded: loaded (/etc/systemd/system/gestures.service; enabled; vendor preset:
enabled)
  Active: inactive (dead) since Wed 2020-01-22 20:24:11 CST; 16min ago
Main PID: 360 (code=exited, status=0/SUCCESS)

Jan 22 20:24:11 Debian-Desktop systemd[1]: Started gestures.
Jan 22 20:24:11 Debian-Desktop dex[360]: File does not exist: /home/rock/.config
/autostart/libinput-gestures.desktop

Well there is your problem, dex cannot find your .desktop file. is your user name different from the default 'rock' user?


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

Forum Jump:


Users browsing this thread: 1 Guest(s)