fusuma 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/README.md +2 -2
- data/fusuma.gemspec +1 -0
- data/lib/fusuma/gesture_action.rb +10 -10
- data/lib/fusuma/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 148b3255a66309d6e395563434f329d9d2aa7644
|
4
|
+
data.tar.gz: 2aa17df3eccdf7efb2b672ecd1d238a8513d50a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223772b06f859d05839ba166204d996a844e33772dfc7262e043da3a36fd411ac969dc9576d49bd1ad73d70fed1aa2baf03b42365c2ef24f3289cc8dd714576e
|
7
|
+
data.tar.gz: c8e9fd768b01da06eee21c7248159d0bd89c8fdc0cbd51f8929f2e93afe3eca1a3a900270f829ff1c3dcfe95d20221f797dfe80b085f3834fa082310fcef3a98
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Fusuma [](https://badge.fury.io/rb/fusuma)
|
1
|
+
# Fusuma [](https://badge.fury.io/rb/fusuma) [](https://travis-ci.org/iberianpig/fusuma)
|
2
2
|
|
3
3
|
Fusuma is multitouch gesture recognizer.
|
4
4
|
This gem makes your linux PC able to recognize swipes or pinchs and assign shortcuts to them.
|
@@ -37,7 +37,7 @@ Install Fusuma:
|
|
37
37
|
## Customize
|
38
38
|
|
39
39
|
You can customize the settings for gestures to put and edit `~/.config/fusuma/config.yml`.
|
40
|
-
*NOTE*: You will need to create the
|
40
|
+
*NOTE*: You will need to create the `~/.config/fusuma` directory if it doesn't exist yet.
|
41
41
|
|
42
42
|
|
43
43
|
### Sample (default keymap for Elementary OS)
|
data/fusuma.gemspec
CHANGED
@@ -28,23 +28,23 @@ module Fusuma
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def gesture_action_arguments(libinput_line)
|
31
|
-
action, time,
|
32
|
-
|
33
|
-
parse_finger_directions(
|
31
|
+
action, time, finger, other = parse_libinput(libinput_line)
|
32
|
+
move_x, move_y, zoom =
|
33
|
+
parse_finger_directions(other)
|
34
34
|
directions = { move: { x: move_x, y: move_y }, zoom: zoom }
|
35
35
|
[time, action, finger, directions]
|
36
36
|
end
|
37
37
|
|
38
38
|
def parse_libinput(line)
|
39
|
-
_device,
|
40
|
-
|
41
|
-
[action, time,
|
39
|
+
_device, action, time, other = line.strip.split(nil, 4)
|
40
|
+
finger, other = other.split(nil, 2)
|
41
|
+
[action, time, finger, other]
|
42
42
|
end
|
43
43
|
|
44
|
-
def parse_finger_directions(
|
45
|
-
|
46
|
-
|
47
|
-
[
|
44
|
+
def parse_finger_directions(line)
|
45
|
+
return [] if line.nil?
|
46
|
+
move_x, move_y, _, _, _, zoom = line.tr('/|(|)', ' ').split
|
47
|
+
[move_x, move_y, zoom]
|
48
48
|
end
|
49
49
|
end
|
50
50
|
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.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: reek
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: Fusuma is multitouch gesture recognizer. This gem makes your linux PC
|
98
112
|
able to recognize swipes or pinchs and assign shortcuts to them. Read installation
|
99
113
|
on Github(https://github.com/iberianpig/fusuma#installation).
|