LoginSignup
0
1

Ubuntu 20.04でもタッチパッドでジェスチャを使いたい

Posted at

あれ?Ubuntuってマルチタッチジェスチャできなかったっけ?

5,6年ぶりにラップトップにUbuntuを入れて触ったら、3本指スワイプどころかピンチイン/ピンチアウトもできなくてびっくりした。
MacやWindowsに洗脳されてたのかもしれないが、やはりジェスチャは使えたほうが便利なのでなんとかしたい。

libinput-gesturesで出来るっぽい

3年前の記事が見つかった。三年経てば文殊の知恵もあてにならないとか言われているので記事として残しておく。

参考記事

環境

  • OS
    • Ubuntu 20.04.6
  • その他
    • Python 3.8.10 (pyenv)
    • libinput 1.15.5-1

事前準備

  1. inputグループに追加

    sudo gpasswd -a $USER input
    
  2. なんか必要なやつを入れる

    sudo apt install wmctrl xdotool
    # 入ってなければlibinput-toolsも入れるらしいけど今回の環境には入ってた
    

libinput-gesturesの導入

  1. 本体のインストール

    git clone https://github.com/bulletmark/libinput-gestures.git
    cd libinput-gestures
    sudo ./libinput-gestures-setup install
    libinput-gestures-setup autostart start # 自動起動
    sudo reboot
    
  2. ジェスチャの設定
    デフォルトは好みじゃないのでいじる。
    ジェスチャに対応させるコマンドはwmctrlとxdotoolのドキュメントを読むといい。

    touch ~/.config/libinput-gestures.conf
    nano libinput-gestures.conf
    libinput-gestures-setup restart
    

    中身

    gesture swipe up    xdotool key super
    gesture swipe down  xdotool key ctrl+w
    gesture swipe left  xdotool key ctrl+Tab
    gesture swipe right xdotool key ctrl+shift+Tab
    gesture pinch in    xdotool key ctrl+minus
    gesture pinch out   xdotool key ctrl+plus
    

終わり

windowsやmacのピンチイン/ピンチアウトのような無段階?のズームができないけどひとまず満足できた。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1