ubuntu安装fusuma,配置文件

本文详细介绍了如何在Ubuntu系统上安装和配置Fusuma,一个基于Ruby的命令行工具,用于自定义触摸板手势。步骤包括获取权限、安装依赖、本地安装gem、启用和配置Fusuma,以及开机自启动和卸载过程。
摘要由CSDN通过智能技术生成

安装fusuma

fusuma官网

安装

授予读取触摸板设备的权限

必须是 Input 组的成员才能阅读 Fusuma 的触摸板。

sudo gpasswd -a $USER input

重启

reboot

安装依赖项

  1. 安装libinput-tools
sudo apt-get install libinput-tools
  1. 安装Ruby(fusuma基于Ruby运行)
sudo apt-get install ruby
  1. 安装fusuma
sudo gem install fusuma

** 如果上面命令正常运可直接跳到第四步**

注意:当在安装gem的时候有时会报下面的错误,或是gem install 太慢 或是无法联接 timeout

WARNING: RubyGems 1.2+ index not found for:

RubyGems will revert to legacy indexes degrading performance.

这时可以采用本地安装的方式

  • 可以在Ruby官网在中下载fusuma安装包本地安装,直接搜索fusuma即可
gem install -l xxx.gem文件
  1. 安装键盘模拟工具xdotool (optional)(fusuma通过此软件模拟快捷键)
sudo apt-get install xdotool

如何启用

  1. 在终端中输入
fusuma

如果在GNOME中无反应:
通过运行以下命令,确保触摸板事件已发送到 GNOME 桌面:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
  1. 开机自启设置
  • 找到“启用应用程序”
  • 打开启用应用程序,找到“添加”按钮
  • 在“名称”中填写应用名称fusuma,在“命令”填写fusuma
  • 点击“添加”,fusuma就可以开机自启了。

fusuma配置文件

Fusuma是一个命令行工具,所有操作都在终端中进行

  • 打开fusuma的配置文件:
nano ~/.config/fusuma/config.yml
  • 配置文件的绝对路径为:
~/.config/fusuma/config.yml
  • 用文件夹查看记得勾选“显示隐藏文件”

如何配置请查阅fusuma官网

默认配置

swipe:
  3: 
    left: 
      shortcut: 'alt+Left'
    right: 
      shortcut: 'alt+Right'
    up: 
      shortcut: 'ctrl+t'
    down: 
      shortcut: 'ctrl+w'
  4:
    left: 
      shortcut: 'super+Left'
    right: 
      shortcut: 'super+Right'
    up: 
      shortcut: 'super+a'
    down: 
      shortcut: 'super+s'
pinch:
  in:
    shortcut: 'ctrl+plus'
  out:
     shortcut: 'ctrl+minus'
 
threshold:
  swipe: 1
  pinch: 1
 
interval:
  swipe: 1
  pinch: 1

我的配置文件

swipe:
  3:
    left:
      command: 'xdotool key alt+Left'
    right:
      command: 'xdotool key alt+Right'
    up:
      command: 'xdotool key ctrl+alt+Down'
      threshold: 1.5
    down:
      command: 'xdotool key ctrl+alt+Up'
      threshold: 1.5
  4:
    left:
      command: 'xdotool key super+Left'
    right:
      command: 'xdotool key super+Right'
    up:
      command: 'xdotool key super+Up'
    down:
      command: 'xdotool key super+s'
pinch:
  2:
    in:
      command: 'xdotool key ctrl+equal'
      threshold: 0.1
    out:
      command: 'xdotool key ctrl+minus'
      threshold: 0.1

threshold:
  swipe: 1
  pinch: 1

interval:
  swipe: 1
  pinch: 1

卸载

fusuma正常卸载即可

卸载Ruby和gem

  1. 如果是使用Ubuntu软件包安装的
sudo apt-get purge ruby rubygems 

如果您使用RVM安装Ruby,以下命令将完全删除RVM安装目录

  rvm implode 
  1. 删除Ruby Gems
 gem uninstall rvm 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值