fusuma 3.6.2 → 3.8.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/README.md +35 -17
- data/lib/fusuma/custom_process.rb +1 -1
- data/lib/fusuma/libinput_command.rb +15 -3
- data/lib/fusuma/plugin/inputs/libinput_command_input.rb +6 -0
- data/lib/fusuma/plugin/parsers/libinput_gesture_parser.rb +31 -0
- data/lib/fusuma/version.rb +1 -1
- data/lib/fusuma.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcdbd20f4f5c91e04133f135869a38c5f6c9e4dd3dfb49dd88930baa65a989f0
|
4
|
+
data.tar.gz: a4885c3d8cb292cad9af3bb28cbb444f460cd5d2a6c3b989951de114587dbe55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d110077da416736b0ead983657d0b1ce900b8ac9a58e9c5f9373f6483bb3c6b97120918610f7d8eb5e9bf73183dc273c29c2c5b92ae0378617962ae101d29489
|
7
|
+
data.tar.gz: 2bf50d5806c511858484305b930dea41e5adfc8b22acdf9a782c15db7b4aba8c648c98defbcedb670d273bb08c13b5240b3d951882473e65bc584ade638c8dc1
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# Fusuma
|
2
2
|
 [](https://github.com/iberianpig/fusuma/actions/workflows/main.yml)
|
3
3
|
|
4
|
-
Fusuma is multitouch gesture
|
5
|
-
This gem makes your linux able to recognize swipes or pinchs and assign commands to them.
|
4
|
+
Fusuma is a powerful tool designed to enable multitouch gesture recognition on Linux, providing intuitive operations for users. By utilizing gestures like swipes and pinches on laptops and devices with touchpads, you can create a more efficient working environment.
|
6
5
|
|
7
6
|

|
8
7
|
|
@@ -10,11 +9,12 @@ This gem makes your linux able to recognize swipes or pinchs and assign commands
|
|
10
9
|
|
11
10
|
## Features
|
12
11
|
|
13
|
-
- Easy
|
14
|
-
-
|
15
|
-
- Sensitivity
|
16
|
-
-
|
17
|
-
|
12
|
+
- **Easy Installation**: Quick setup via RubyGems.
|
13
|
+
- **Flexible Configuration**: Customize gestures and actions freely in YAML file format.
|
14
|
+
- **Sensitivity Settings**: Fine-tune gesture recognition with adjustable thresholds and intervals to suit your preferences and enhance precision.
|
15
|
+
- **Extension through Plugins**: A [plugin system](https://github.com/iberianpig/fusuma/#fusuma-plugins) allows for additional functionality as needed.
|
16
|
+
|
17
|
+
Enhance your Linux experience by evolving your interaction with Fusuma!
|
18
18
|
|
19
19
|
## Installation
|
20
20
|
|
@@ -379,22 +379,40 @@ plugin:
|
|
379
379
|
- "EXTERNAL TOUCHPAD NAME"
|
380
380
|
```
|
381
381
|
|
382
|
-
## Autostart
|
382
|
+
## Autostart
|
383
|
+
|
384
|
+
### Method 1: Using gnome-session-properties
|
383
385
|
|
384
386
|
1. Check the path where you installed fusuma with `which fusuma`
|
385
387
|
2. Open `gnome-session-properties`
|
386
388
|
3. Add Fusuma and enter the location where the above path was checked in the command input field
|
387
389
|
4. Add the `-d` option at the end of the command input field
|
388
390
|
|
389
|
-
|
391
|
+
### Method 2: Creating a Desktop Entry Manually
|
392
|
+
|
393
|
+
1. Check the path where you installed fusuma with `which fusuma`
|
394
|
+
2. Create a new file named `fusuma.desktop` in the `~/.config/autostart/` directory.
|
395
|
+
3. Add the following content to the `fusuma.desktop` file:
|
396
|
+
|
397
|
+
```ini
|
398
|
+
[Desktop Entry]
|
399
|
+
Name=fusuma
|
400
|
+
Comment=run fusuma
|
401
|
+
Exec={path_to_fusuma} -d --log=/tmp/fusuma.log
|
402
|
+
Icon=input-touchpad
|
403
|
+
X-GNOME-Autostart-enabled=true
|
404
|
+
Type=Application
|
405
|
+
```
|
406
|
+
|
407
|
+
Replace `{path_to_fusuma}` with the path obtained from `which fusuma`.
|
408
|
+
4. Save the file and ensure its permissions are correctly set to be executable.
|
409
|
+
5. Restart your system or session to verify that fusuma starts automatically.
|
390
410
|
|
391
|
-
|
411
|
+
## Fusuma Plugins
|
392
412
|
|
393
|
-
|
394
|
-
- Features for specific Linux distributions
|
395
|
-
- Setting different gestures per applications
|
413
|
+
Fusuma's functionality can be extended with a variety of plugins. Below is a list of available plugins along with their purposes:
|
396
414
|
|
397
|
-
### Available
|
415
|
+
### Available Plugins
|
398
416
|
|
399
417
|
Fusuma plugins are provided with the `fusuma-plugin-XXXXX` naming convention and hosted on [RubyGems](https://rubygems.org/search?utf8=%E2%9C%93&query=fusuma-plugins).
|
400
418
|
|
@@ -423,14 +441,14 @@ sudo gem list fusuma-plugin- | cut -d' ' -f1 | xargs --no-run-if-empty sudo gem
|
|
423
441
|
[](http://www.youtube.com/watch?v=bn11Iwvf29I "Multitouch Touchpad Gestures in Linux with Fusuma")
|
424
442
|
[Multitouch Touchpad Gestures in Linux with Fusuma](http://www.youtube.com/watch?v=bn11Iwvf29I) by [Eric Adams](https://www.youtube.com/user/igster75)
|
425
443
|
|
426
|
-
|
444
|
+
### Support and Sponsorship
|
445
|
+
|
446
|
+
If you enjoy working on Fusuma or find it beneficial, consider supporting the developer through [GitHub Sponsors](https://github.com/sponsors/iberianpig).
|
427
447
|
|
428
448
|
I'm a Freelance Engineer in Japan and working on these products after finishing my regular work or on my holidays.
|
429
449
|
Currently, my open-source contribution times is not enough.
|
430
450
|
If you like my work and want to contribute and become a sponsor, I will be able to focus on my projects.
|
431
451
|
|
432
|
-
- [GitHub Sponsors](https://github.com/sponsors/iberianpig)
|
433
|
-
|
434
452
|
## Contributing
|
435
453
|
|
436
454
|
Bug reports and pull requests are welcome on GitHub at https://github.com/iberianpig/fusuma. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -6,6 +6,7 @@ module Fusuma
|
|
6
6
|
# Execute libinput command
|
7
7
|
class LibinputCommand
|
8
8
|
def initialize(libinput_options: [], commands: {})
|
9
|
+
@libinput_command = commands[:libinput_command]
|
9
10
|
@debug_events_command = commands[:debug_events_command]
|
10
11
|
@list_devices_command = commands[:list_devices_command]
|
11
12
|
@libinput_options = libinput_options
|
@@ -20,6 +21,11 @@ module Fusuma
|
|
20
21
|
Gem::Version.new(version) >= Gem::Version.new(NEW_CLI_OPTION_VERSION)
|
21
22
|
end
|
22
23
|
|
24
|
+
# @return [Boolean]
|
25
|
+
def libinput_1_27_0_or_later?
|
26
|
+
Gem::Version.new(version) >= Gem::Version.new("1.27.0")
|
27
|
+
end
|
28
|
+
|
23
29
|
# @return [String]
|
24
30
|
def version
|
25
31
|
# version_command prints "1.6.3\n"
|
@@ -45,7 +51,9 @@ module Fusuma
|
|
45
51
|
# @return [String] command
|
46
52
|
# @raise [SystemExit]
|
47
53
|
def version_command
|
48
|
-
if @
|
54
|
+
if @libinput_command
|
55
|
+
"#{@libinput_command} --version"
|
56
|
+
elsif @debug_events_command && @list_devices_command
|
49
57
|
"#{@list_devices_command} --version"
|
50
58
|
elsif which("libinput")
|
51
59
|
"libinput --version"
|
@@ -58,7 +66,9 @@ module Fusuma
|
|
58
66
|
end
|
59
67
|
|
60
68
|
def list_devices_command
|
61
|
-
if @
|
69
|
+
if @libinput_command
|
70
|
+
@libinput_command + " list-devices"
|
71
|
+
elsif @list_devices_command
|
62
72
|
@list_devices_command
|
63
73
|
elsif new_cli_option_available?
|
64
74
|
"libinput list-devices"
|
@@ -68,7 +78,9 @@ module Fusuma
|
|
68
78
|
end
|
69
79
|
|
70
80
|
def debug_events_command
|
71
|
-
if @
|
81
|
+
if @libinput_command
|
82
|
+
@libinput_command + " debug-events"
|
83
|
+
elsif @debug_events_command
|
72
84
|
@debug_events_command
|
73
85
|
elsif new_cli_option_available?
|
74
86
|
"libinput debug-events"
|
@@ -16,6 +16,7 @@ module Fusuma
|
|
16
16
|
"enable-tap": [TrueClass, FalseClass],
|
17
17
|
"show-keycodes": [TrueClass, FalseClass],
|
18
18
|
verbose: [TrueClass, FalseClass],
|
19
|
+
"libinput-command": [String],
|
19
20
|
"libinput-debug-events": [String],
|
20
21
|
"libinput-list-devices": [String]
|
21
22
|
}
|
@@ -35,6 +36,7 @@ module Fusuma
|
|
35
36
|
@command ||= LibinputCommand.new(
|
36
37
|
libinput_options: libinput_options,
|
37
38
|
commands: {
|
39
|
+
libinput_command: libinput_command,
|
38
40
|
debug_events_command: debug_events_command,
|
39
41
|
list_devices_command: list_devices_command
|
40
42
|
}
|
@@ -59,6 +61,10 @@ module Fusuma
|
|
59
61
|
].compact
|
60
62
|
end
|
61
63
|
|
64
|
+
def libinput_command
|
65
|
+
config_params(:"libinput-command")
|
66
|
+
end
|
67
|
+
|
62
68
|
def debug_events_command
|
63
69
|
config_params(:"libinput-debug-events")
|
64
70
|
end
|
@@ -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
data/lib/fusuma.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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-04-02 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
|
@@ -72,7 +72,7 @@ licenses:
|
|
72
72
|
metadata:
|
73
73
|
rubygems_mfa_required: 'true'
|
74
74
|
yard.run: yri
|
75
|
-
post_install_message:
|
75
|
+
post_install_message:
|
76
76
|
rdoc_options: []
|
77
77
|
require_paths:
|
78
78
|
- lib
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubygems_version: 3.4.19
|
91
|
-
signing_key:
|
91
|
+
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: Multitouch gestures with libinput driver, Linux
|
94
94
|
test_files: []
|