fusuma 3.8.0 → 3.9.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 +4 -4
- data/lib/fusuma/config/index.rb +0 -1
- data/lib/fusuma/custom_process.rb +1 -1
- data/lib/fusuma/device.rb +5 -2
- data/lib/fusuma/libinput_command.rb +8 -5
- data/lib/fusuma/version.rb +1 -1
- data/lib/fusuma.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25a6fc321e7305354cb3b86d331dd4ec749043eaeef977dc125efbd0a515533f
|
4
|
+
data.tar.gz: 5621071b0f8cf1997dbed8a4cd25afbe7cd9721ee6d9ec0178c201d2fcd20f37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc8d6c912cb7e650ed51e7c28a021e58a3be91a61190458e7e25bc7450051b01cbc10876c882fde11e70c60575c64163f547dbb6932e5c4a6682792fb995375
|
7
|
+
data.tar.gz: 2796ede1b96046738a3e1feb93f0137a7f4b48fd599752b9b4d6ab047f9ffdcf082f2aaf94ef4988f3cafde150e89522db057222804acdaf8d2f80593ed0d543
|
data/lib/fusuma/config/index.rb
CHANGED
data/lib/fusuma/device.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "multi_logger"
|
4
|
-
|
4
|
+
require "fusuma/plugin/inputs/libinput_command_input"
|
5
5
|
|
6
6
|
module Fusuma
|
7
7
|
# detect input device
|
@@ -65,13 +65,16 @@ module Fusuma
|
|
65
65
|
def fetch_devices
|
66
66
|
line_parser = LineParser.new
|
67
67
|
|
68
|
-
libinput_command = Plugin::Inputs::LibinputCommandInput.new.command
|
69
68
|
# note: this libinput command takes a nontrivial amount of time (~200ms)
|
70
69
|
libinput_command.list_devices do |line|
|
71
70
|
line_parser.push(line)
|
72
71
|
end
|
73
72
|
line_parser.generate_devices
|
74
73
|
end
|
74
|
+
|
75
|
+
def libinput_command
|
76
|
+
@libinput_command ||= Plugin::Inputs::LibinputCommandInput.new.command
|
77
|
+
end
|
75
78
|
end
|
76
79
|
|
77
80
|
# parse line and generate devices
|
@@ -36,11 +36,14 @@ module Fusuma
|
|
36
36
|
def list_devices(&block)
|
37
37
|
cmd = list_devices_command
|
38
38
|
MultiLogger.debug(list_devices: cmd)
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
o, e, s = Open3.capture3(cmd)
|
40
|
+
|
41
|
+
unless s.success?
|
42
|
+
MultiLogger.error("libinput list-devices failed with output: #{o}")
|
43
|
+
return
|
44
|
+
end
|
45
|
+
|
46
|
+
o.each_line(&block)
|
44
47
|
end
|
45
48
|
|
46
49
|
# @return [Integer] return a latest line libinput debug-events
|
data/lib/fusuma/version.rb
CHANGED
data/lib/fusuma.rb
CHANGED
@@ -15,8 +15,8 @@ module Fusuma
|
|
15
15
|
def run(option = {})
|
16
16
|
read_options(option)
|
17
17
|
instance = new
|
18
|
-
instance.initialize_plugins
|
19
18
|
instance.set_trap
|
19
|
+
instance.initialize_plugins
|
20
20
|
## NOTE: Uncomment following line to measure performance
|
21
21
|
# instance.run_with_lineprof
|
22
22
|
instance.run
|
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.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-26 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
|