GNU Emacs Gestures

 Use multi-touch gestures in GNU Emacs.


 

- Install touchegg https://github.com/JoseExposito/touchegg

- Create a copy of touchegg.conf

$ mkdir -p ~/.config/touchegg && cp -n /usr/share/touchegg/touchegg.conf ~/.config/touchegg/touchegg.conf

 

- Add a section for Emacs (pinch to zoom) before closing <touchegg> tag.

   <application name="Emacs">
    <gesture type="PINCH" fingers="2" direction="IN">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>x+KP_Subtract</keys>
        <decreaseKeys>KP_Add</decreaseKeys>
      </action>
    </gesture>

    <gesture type="PINCH" fingers="2" direction="OUT">
      <action type="SEND_KEYS">
        <repeat>true</repeat>
        <modifiers>Control_L</modifiers>
        <keys>x+KP_Add</keys>
        <decreaseKeys>KP_Subtract</decreaseKeys>
      </action>
    </gesture>
  </application>

- Run touchegg command in a terminal. This allows for easy debugging. TIP: If you slow down your movement, you can see some animation.

Left swipe animation

- Once you're satisfied with the behavior, ensure touchegg service is enabled and running.

$ sudo systemctl enable touchegg.service
$ sudo systemctl start touchegg

Comments

Popular posts from this blog

GNU Emacs as a Comic Book Reader

HTML Renderer (Emacs)

Mozilla Readability in GNU Emacs