This example based on two packages: well known in Xorg touchegg and started in 2022 dotool. The dotool help us with pinch move on Wayland.
sudo usermod -a -G input $USER
and then it's foolproof to reboot to make the group and rule effective
Fedora:
dnf install touchegg
OpenSUSE:
zypper install touchegg
Mageia
urpmi touchegg
See instructions here: dotool from Open Build Service or install from Fedora copr.
Enable and start touchegg service
sudo systemctl --now enable touchegg.service
On Fedora, Mageia post install command udevadm run automatically
sudo udevadm control --reload && sudo udevadm trigger
Enable and start dotoold service for your current user
systemctl --user --now enable dotoold.service
Copy touchegg.conf to current user's config directory
cp /usr/share/touchegg/touchegg.conf ~/.config/touchegg/touchegg.conf
Open local ~/.config/touchegg/touchegg.conf. Find xml section <application name="All">
and add:
<gesture type="PINCH" fingers="2" direction="IN">
<action type="RUN_COMMAND">
<repeat>true</repeat>
<command>echo key super+minus | dotoolc</command>
<decreaseCommand>echo key super+equal | dotoolc</decreaseCommand>
<on>begin</on>
</action>
</gesture>
<gesture type="PINCH" fingers="2" direction="OUT">
<action type="RUN_COMMAND">
<repeat>true</repeat>
<command>echo key super+equal | dotoolc</command>
<decreaseCommand>echo key super+minus | dotoolc</decreaseCommand>
<on>begin</on>
</action>
</gesture>
Note: if your hot keys not Meta+=/Meta+-, use your own from result of dotool --list-keys
No configuration needed (John Gebbie, you rocks!).
Q: Why use dotoold/dotoolc combination? Command echo key super+minus | dotool
works same...
A: No, not same. dotoold with dotoolc calls works better and faster.