安装fusuma
安装
授予读取触摸板设备的权限
必须是 Input 组的成员才能阅读 Fusuma 的触摸板。
sudo gpasswd -a $USER input
重启
reboot
安装依赖项
- 安装libinput-tools
sudo apt-get install libinput-tools
- 安装Ruby(fusuma基于Ruby运行)
sudo apt-get install ruby
- 安装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文件
- 安装键盘模拟工具xdotool (optional)(fusuma通过此软件模拟快捷键)
sudo apt-get install xdotool
如何启用
- 在终端中输入
fusuma
如果在GNOME中无反应:
通过运行以下命令,确保触摸板事件已发送到 GNOME 桌面:
gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
- 开机自启设置
- 找到“启用应用程序”
- 打开启用应用程序,找到“添加”按钮
- 在“名称”中填写应用名称
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
- 如果是使用Ubuntu软件包安装的
sudo apt-get purge ruby rubygems
如果您使用RVM安装Ruby,以下命令将完全删除RVM安装目录
rvm implode
- 删除Ruby Gems
gem uninstall rvm