ubuntu安装fusuma

安装fusuma

fusuma官网

安装

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

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

1
sudo gpasswd -a $USER input

重启

1
reboot

安装依赖项

  1. 安装libinput-tools
    1
    sudo apt-get install libinput-tools
  2. 安装Ruby(fusuma基于Ruby运行)
    1
    sudo apt-get install ruby
  3. 安装fusuma
    1
    sudo gem install fusuma
    ** 如果上面命令正常运可直接跳到第四步**

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

1
2
3
WARNING: RubyGems 1.2+ index not found for:

RubyGems will revert to legacy indexes degrading performance.

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

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

如何启用

  1. 在终端中输入

    1
    fusuma

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

    1
    gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled
  2. 开机自启设置

  • 找到“启用应用程序”
  • 打开启用应用程序,找到“添加”按钮
  • 在“名称”中填写应用名称fusuma,在“命令”填写fusuma
  • 点击“添加”,fusuma就可以开机自启了。

fusuma配置文件

Fusuma是一个命令行工具,所有操作都在终端中进行
- 打开fusuma的配置文件:
1
nano ~/.config/fusuma/config.yml

- 配置文件的绝对路径为:
1
~/.config/fusuma/config.yml

- 用文件夹查看记得勾选“显示隐藏文件”

如何配置请查阅fusuma官网

默认配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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

我的配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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软件包安装的
    1
    sudo apt-get purge ruby rubygems 
    如果您使用RVM安装Ruby,以下命令将完全删除RVM安装目录
    1
    rvm implode 
  2. 删除Ruby Gems
    1
    gem uninstall rvm 

ubuntu安装fusuma
http://example.com/2023/12/01/ubuntu安装fusuma/
作者
lidonghang-02
发布于
2023年12月1日
许可协议