fusuma多指操作

2020-03-08  本文已影响0人  小幸运Q

安装:

sudo gpasswd -a $USER input
sudo apt-get install libinput-tools -y
sudo apt-get install ruby -y
sudo apt install fusuma -y
sudo apt-get install xdotool -y
gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

创建自定义配置文件:

mkdir -p ~/.config/fusuma        # create config directory

vi ~/.config/fusuma/config.yml # edit config file.

四指左右->切换工作区(虚拟桌面),三指左右->切换当前应用,双指收拢扩张->放大缩小:

swipe:
  4:
    left:
      command: 'xdotool key ctrl+alt+Down'
    right:
      command: 'xdotool key ctrl+alt+Up'
  3:
    up:
      command: 'xdotool key super'
    down:
      command: 'xdotool key super'
    left:
      command: 'xdotool key alt+Shift+Tab'
    right:
      command: 'xdotool key alt+Tab'
pinch:
    in:
        command: 'xdotool key ctrl+plus'
        threshold: 0.1     
    out:
        command: 'xdotool key ctrl+minus'
        threshold: 0.1

threshold:
  swipe: 0.8
  pinch: 1

interval:
  swipe: 0.8
  pinch: 1

threshold:对滑动/捏的敏感性。默认值为1。如果滑动阈值为0.5,则将滑动长度缩短一半。

interval:是滑动/捏之间的延迟。默认值为1。如果滑动间隔为0.5,则将滑动间隔缩短一半以识别下一次滑动。

注: 快捷键里添加ctral+shift+a ---> 命令 gnome-screenshot -a可以得到qq里自带的快捷键效果。


后来发现xdtool对alt+tab键适配很差,会导致系统卡顿

试试https://github.com/iberianpig/fusuma-plugin-sendkey

sudo apt-get install libevdev-dev ruby-dev -y
sudo gem install fusuma-plugin-sendkey
rm ~/.config/fusuma/config.yml
vi ~/.config/fusuma/config.yml # edit config file.
swipe:
  4:
# 取消了三指上滑多窗口,改为四指上划
    up:
      command: 'xdotool key super'
    down:
      command: 'xdotool key super'
    left:
      command: 'xdotool key ctrl+alt+Down'
    right:
      command: 'xdotool key ctrl+alt+Up'
  3:
  # 增加了三指上滑下滑就行chrome各个tab页面切换的操作
    up:
      sendkey: 'LEFTCTRL+TAB'
    down:
      sendkey: 'LEFTCTRL+LEFTSHIFT+TAB'
    left:
      sendkey: 'LEFTALT+LEFTSHIFT+TAB'
    right:
      sendkey: 'LEFTALT+TAB'
pinch:
    in:
        command: 'xdotool key ctrl+plus'
        threshold: 0.1     
    out:
        command: 'xdotool key ctrl+minus'
        threshold: 0.1

threshold:
  swipe: 0.6
  pinch: 1

interval:
  swipe: 0.6
  pinch: 1
上一篇下一篇

猜你喜欢

热点阅读