fusuma 3.6.1 → 3.7.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea61b72e99beea075544c95d3a3307161d471feb2849d27eda02f469a0597afb
|
4
|
+
data.tar.gz: cccc575de906c854c49655c80848e97c4f5be4bc6e8f48645f30f5277ea25f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cad08188f1318b0e6ccfb2630ff6d2a8960289f084d3390e2870d97ed0743d4868dd0ed4218238be1b73048f7bcd841fdb50c74ed3306ff4a56773261032e14d
|
7
|
+
data.tar.gz: 77c81733d411db62f3eeb55a87f55ba25cacc9e2dba495fd0026b5cae2e0f095c447458a6506f4cf81efec71dcbe4caab4b461bbc17e78c9467d344a5c3b2112
|
@@ -20,6 +20,11 @@ module Fusuma
|
|
20
20
|
Gem::Version.new(version) >= Gem::Version.new(NEW_CLI_OPTION_VERSION)
|
21
21
|
end
|
22
22
|
|
23
|
+
# @return [Boolean]
|
24
|
+
def libinput_1_27_0_or_later?
|
25
|
+
Gem::Version.new(version) >= Gem::Version.new("1.27.0")
|
26
|
+
end
|
27
|
+
|
23
28
|
# @return [String]
|
24
29
|
def version
|
25
30
|
# version_command prints "1.6.3\n"
|
data/lib/fusuma/plugin/base.rb
CHANGED
@@ -53,9 +53,8 @@ module Fusuma
|
|
53
53
|
|
54
54
|
next if param_types.any? { |klass| val.is_a?(klass) }
|
55
55
|
|
56
|
-
MultiLogger.error("Please fix config.yml
|
57
|
-
MultiLogger.error("
|
58
|
-
.join(" => :")} => :#{key} should be #{param_types.join(" OR ")}.")
|
56
|
+
MultiLogger.error("Please fix config.yml")
|
57
|
+
MultiLogger.error("`#{config_index.keys.join(".")}.#{key}` should be #{param_types.join(" OR ")}.")
|
59
58
|
exit 1
|
60
59
|
end
|
61
60
|
end
|
@@ -40,6 +40,7 @@ module Fusuma
|
|
40
40
|
plugin_gemspec = Gem::Specification.load(plugin_gemspec_path)
|
41
41
|
fusuma_gemspec_path = File.expand_path("../../../fusuma.gemspec", __dir__)
|
42
42
|
fusuma_gemspec = Gem::Specification.load(fusuma_gemspec_path)
|
43
|
+
next if plugin_gemspec == fusuma_gemspec
|
43
44
|
|
44
45
|
if plugin_gemspec.dependencies.find { |d| d.name == "fusuma" }&.match?(fusuma_gemspec)
|
45
46
|
siblings_plugin
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "../events/records/record"
|
4
4
|
require_relative "../events/records/gesture_record"
|
5
|
+
require_relative "../../libinput_command"
|
5
6
|
|
6
7
|
module Fusuma
|
7
8
|
module Plugin
|
@@ -29,6 +30,20 @@ module Fusuma
|
|
29
30
|
private
|
30
31
|
|
31
32
|
def parse_libinput(line)
|
33
|
+
if libinput_1_27_0_or_later?
|
34
|
+
parse_line_1_27_0_or_later(line)
|
35
|
+
else
|
36
|
+
parse_line(line)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def libinput_1_27_0_or_later?
|
41
|
+
return @libinput_1_27_0_or_later if defined?(@libinput_1_27_0_or_later)
|
42
|
+
|
43
|
+
@libinput_1_27_0_or_later = Inputs::LibinputCommandInput.new.command.libinput_1_27_0_or_later?
|
44
|
+
end
|
45
|
+
|
46
|
+
def parse_line(line)
|
32
47
|
_device, event_name, _time, other = line.strip.split(nil, 4)
|
33
48
|
finger, other = other.split(nil, 2)
|
34
49
|
|
@@ -39,6 +54,22 @@ module Fusuma
|
|
39
54
|
[gesture, status, finger, delta]
|
40
55
|
end
|
41
56
|
|
57
|
+
def parse_line_1_27_0_or_later(line)
|
58
|
+
_device, event_name, other = line.strip.split(nil, 3)
|
59
|
+
|
60
|
+
if other[0] != "+"
|
61
|
+
_seq, other = other.split(nil, 2)
|
62
|
+
end
|
63
|
+
|
64
|
+
_time, finger, other = other.split(nil, 3)
|
65
|
+
|
66
|
+
gesture, status = *detect_gesture(event_name)
|
67
|
+
|
68
|
+
status = "cancelled" if gesture == "hold" && status == "end" && other == "cancelled"
|
69
|
+
delta = parse_delta(other)
|
70
|
+
[gesture, status, finger, delta]
|
71
|
+
end
|
72
|
+
|
42
73
|
def detect_gesture(event_name)
|
43
74
|
event_name =~ /GESTURE_(SWIPE|PINCH|HOLD)_(BEGIN|UPDATE|END)/
|
44
75
|
gesture = Regexp.last_match(1).downcase
|
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: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fusuma is multitouch gesture recognizer. This gem makes your touchpad
|
14
14
|
on Linux able to recognize swipes or pinchs and assign command to them. Read installation
|