fusuma 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/lib/fusuma.rb +1 -1
- data/lib/fusuma/config.yml +11 -4
- data/lib/fusuma/event_trigger.rb +5 -7
- data/lib/fusuma/gesture_action.rb +1 -2
- data/lib/fusuma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45e3e3c6fb9720c3ba2b9a5326654a14b2a2daa7
|
4
|
+
data.tar.gz: 86240a1c766363f3d028b46740aea8fbaaf8de8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9d835c20d8ad97b03c9cac293961a10ee61fa8458d5b3e1ce79352896127cf81eb5cc3b3e3c5573b34774a17545106ef796c950e98c1418a4d97b85130c4799
|
7
|
+
data.tar.gz: 11699f299247c0bd80ec568189e040726d1785827aeb9ae756e9147d37eb04c982a689e67ea158fb1277f575a5fc4acdce66313f5a663f4f05ee26dcd01f43e6
|
data/README.md
CHANGED
@@ -3,13 +3,14 @@
|
|
3
3
|
Fusuma is multitouch gesture recognizer.
|
4
4
|
This gem makes your linux PC able to recognize swipes or pinchs and assign commands to them.
|
5
5
|
|
6
|
-
|
6
|
+
![fusuma_image](https://i.gyazo.com/757fef526310b9d68f68e80eb1e4540f.png)
|
7
7
|
|
8
8
|
襖(Fusuma) means sliding door used to partition off rooms in a Japanese house.
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
12
|
-
### 1.
|
12
|
+
### 1. Grant permission to read the touchpad device
|
13
|
+
**IMPORTANT**: You **MUST** be a member of the **INPUT** group to read touchpad by Fusuma.
|
13
14
|
|
14
15
|
```bash
|
15
16
|
$ sudo gpasswd -a $USER input
|
@@ -17,23 +18,24 @@ $ sudo gpasswd -a $USER input
|
|
17
18
|
|
18
19
|
Then, You **MUST** **LOGOUT/LOGIN or REBOOT** to assign this group.
|
19
20
|
|
20
|
-
### 2.
|
21
|
-
|
21
|
+
### 2. Install libinput-tools
|
22
|
+
You need `libinput` release 1.0 or later.
|
22
23
|
|
23
24
|
```bash
|
24
25
|
$ sudo apt-get install libinput-tools
|
25
26
|
```
|
26
27
|
|
27
|
-
### 3.
|
28
|
+
### 3. Install Fusuma
|
28
29
|
|
29
30
|
```bash
|
30
|
-
$ sudo
|
31
|
+
$ sudo gem install fusuma
|
31
32
|
```
|
32
33
|
|
33
|
-
### 4. Install
|
34
|
+
### 4. Install xdotool(optional)
|
34
35
|
|
36
|
+
For sending shortcuts:
|
35
37
|
```bash
|
36
|
-
$ sudo
|
38
|
+
$ sudo apt-get install xdotool
|
37
39
|
```
|
38
40
|
|
39
41
|
### Touchpad not working in GNOME
|
@@ -140,7 +142,7 @@ swipe:
|
|
140
142
|
* `--device="Device name"` : Open the given device only
|
141
143
|
* `--version` : Show fusuma version
|
142
144
|
|
143
|
-
##
|
145
|
+
## Autostart(gnome-session-properties)
|
144
146
|
1. Check where you installed fusuma
|
145
147
|
2. Open `$ gnome-session-properties`
|
146
148
|
3. Add Fusuma and input location where you checked above's path
|
data/lib/fusuma.rb
CHANGED
@@ -75,7 +75,7 @@ module Fusuma
|
|
75
75
|
@action_stack ||= ActionStack.new
|
76
76
|
@action_stack << gesture_action
|
77
77
|
event_trigger = @action_stack.generate_event_trigger
|
78
|
-
event_trigger.
|
78
|
+
event_trigger.exec_command unless event_trigger.nil?
|
79
79
|
end
|
80
80
|
end
|
81
81
|
end
|
data/lib/fusuma/config.yml
CHANGED
@@ -17,11 +17,18 @@ swipe:
|
|
17
17
|
command: 'xdotool key super+a'
|
18
18
|
down:
|
19
19
|
command: 'xdotool key super+s'
|
20
|
+
|
20
21
|
pinch:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
2:
|
23
|
+
in:
|
24
|
+
command: 'xdotool key ctrl+equal'
|
25
|
+
out:
|
26
|
+
command: 'xdotool key ctrl+minus'
|
27
|
+
4:
|
28
|
+
in:
|
29
|
+
command: 'xdotool key super+a'
|
30
|
+
out:
|
31
|
+
command: 'xdotool key super+s'
|
25
32
|
|
26
33
|
threshold:
|
27
34
|
swipe: 0.3
|
data/lib/fusuma/event_trigger.rb
CHANGED
@@ -8,19 +8,17 @@ module Fusuma
|
|
8
8
|
end
|
9
9
|
attr_reader :finger, :direction, :action_type
|
10
10
|
|
11
|
-
def
|
11
|
+
def exec_command
|
12
|
+
return if command.nil?
|
13
|
+
`#{command}`
|
12
14
|
MultiLogger.info("trigger event: #{command}")
|
13
|
-
exec_command(command)
|
14
15
|
end
|
15
16
|
|
16
17
|
private
|
17
18
|
|
18
|
-
def exec_command(command)
|
19
|
-
`#{command}` unless command.nil?
|
20
|
-
end
|
21
|
-
|
22
19
|
def command
|
23
|
-
Config.command(self)
|
20
|
+
Config.command(self).tap { |c| return c if c }
|
21
|
+
Config.shortcut(self).tap { |s| return "xdotool key #{s}" if s }
|
24
22
|
end
|
25
23
|
end
|
26
24
|
end
|
@@ -29,8 +29,7 @@ module Fusuma
|
|
29
29
|
|
30
30
|
def gesture_action_arguments(libinput_line)
|
31
31
|
action, time, finger, other = parse_libinput(libinput_line)
|
32
|
-
move_x, move_y, zoom =
|
33
|
-
parse_finger_directions(other)
|
32
|
+
move_x, move_y, zoom = parse_finger_directions(other)
|
34
33
|
directions = { move: { x: move_x, y: move_y }, zoom: zoom }
|
35
34
|
[time, action, finger, directions]
|
36
35
|
end
|
data/lib/fusuma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusuma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|