fusuma 3.11.1 → 3.11.2

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: '064986ef807ceb1aa5ce1d021cdaf8931e44a1099fe8b72cd6aee283bc7ccf3a'
4
- data.tar.gz: 31d80cdd2c54c1f12a4e55005c4393ae4c3683ed0a0c3a4e506090cc2c0f4f73
3
+ metadata.gz: 515a37e5be710edfd3beda67d734a49ad516dd9c01654afb0bf0d3145ab20c6d
4
+ data.tar.gz: ab7ab39b5097de21b58e403d3b4cdcebc3fab41327ddf0a5fb0c7a3ae6d531a3
5
5
  SHA512:
6
- metadata.gz: f27789347f194611db15b63f8cd8f04c47e3737ad2349950ab2a9210612f76a96f166c50a136bd2e4e22cce8dd9e640f89a7f8be19f2c282b4a071650cc26af1
7
- data.tar.gz: 86d0e0bac6c527e7453f4495bde1e58b4b74942b3670ee313d1a7f0323c7a4f9e5ed44c33f64614357ff8b38bbf9e265e074abbd6ce5915925233e3c7f3adc01
6
+ metadata.gz: 8f84ab4bddf97600928b348dec236008205b7261a90bdf87ee8f6409f8524864ffe587ace33569b64b8ecac773a02a58c3776908186b3a08298dac55f9b0a0ed
7
+ data.tar.gz: 1c2b88e154697a95e96ce8e4b4df1b712f80ac2e27d63ac06c7d6f5824e566d1479df51975241277b881a537a1fd883364e19ed4d9338a9465d39438ed644370
data/bin/console CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'bundler/setup'
5
- require 'fusuma'
4
+ require "bundler/setup"
5
+ require "fusuma"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,9 +10,9 @@ require 'fusuma'
10
10
  # (If you use this, don't forget to add pry to your Gemfile!)
11
11
 
12
12
  def reload!(print = true)
13
- puts 'Reloading ...' if print
13
+ puts "Reloading ..." if print
14
14
  # Main project directory.
15
- root_dir = File.expand_path('..', __dir__)
15
+ root_dir = File.expand_path("..", __dir__)
16
16
  # Directories within the project that should be reloaded.
17
17
  reload_dirs = %w[lib]
18
18
  # Loop through and reload every file in all relevant project directories.
data/exe/fusuma CHANGED
@@ -1,47 +1,47 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'optparse'
5
- require_relative '../lib/fusuma'
4
+ require "optparse"
5
+ require_relative "../lib/fusuma"
6
6
 
7
7
  option = {}
8
8
  opt = OptionParser.new
9
9
 
10
- opt.on('-c', '--config=path/to/file',
11
- 'Use an alternative config file') do |v|
10
+ opt.on("-c", "--config=path/to/file",
11
+ "Use an alternative config file") do |v|
12
12
  option[:config_path] = v
13
13
  end
14
14
 
15
- opt.on('-d', '--daemon',
16
- 'Daemonize process') do |v|
15
+ opt.on("-d", "--daemon",
16
+ "Daemonize process") do |v|
17
17
  option[:daemon] = v
18
18
  end
19
19
 
20
- opt.on('-l', '--list-devices',
21
- 'List available devices') do |v|
20
+ opt.on("-l", "--list-devices",
21
+ "List available devices") do |v|
22
22
  option[:list] = v
23
23
  end
24
24
 
25
- opt.on('--log=path/to/file',
26
- 'Print logs to file') do |v|
25
+ opt.on("--log=path/to/file",
26
+ "Print logs to file") do |v|
27
27
  option[:log_filepath] = v
28
28
  end
29
29
 
30
- opt.on('--show-config', 'Show config as YAML format which is loaded internally') do |v|
30
+ opt.on("--show-config", "Show config as YAML format which is loaded internally") do |v|
31
31
  option[:show_config] = v
32
32
  end
33
33
 
34
34
  opt.on('--device="Device name"',
35
- 'Open the given device only (DEPRECATED)') do |v|
35
+ "Open the given device only (DEPRECATED)") do |v|
36
36
  option[:device] = v
37
37
  end
38
38
 
39
- opt.on('-v', '--verbose',
40
- 'Show details about the results of running fusuma') do |v|
39
+ opt.on("-v", "--verbose",
40
+ "Show details about the results of running fusuma") do |v|
41
41
  option[:verbose] = v
42
42
  end
43
43
 
44
- opt.on('--version', 'Show fusuma version') do |v|
44
+ opt.on("--version", "Show fusuma version") do |v|
45
45
  option[:version] = v
46
46
  end
47
47
 
@@ -19,18 +19,16 @@ module Fusuma
19
19
  def search(index, location:)
20
20
  key = index.keys.first
21
21
  return location if key.nil?
22
-
23
22
  return nil if location.nil?
24
-
25
23
  return nil unless location.is_a?(Hash)
26
24
 
27
- next_index = Index.new(Array(index.keys[1..-1]))
25
+ next_index = Index.new(index.keys.drop(1))
28
26
 
29
- value = nil
30
- next_location_cadidates(location, key).find do |next_location|
31
- value = search(next_index, location: next_location)
27
+ next_location_cadidates(location, key).each do |next_location|
28
+ result = search(next_index, location: next_location)
29
+ return result if result
32
30
  end
33
- value
31
+ nil
34
32
  end
35
33
 
36
34
  #: (Fusuma::Config::Index, location: Array[untyped], context: Hash[untyped, untyped] | nil) -> untyped
@@ -77,7 +75,7 @@ module Fusuma
77
75
  def next_location_cadidates(location, key)
78
76
  [
79
77
  location[key.symbol],
80
- key.skippable && location
78
+ key.skippable ? location : nil
81
79
  ].compact
82
80
  end
83
81
 
@@ -8,6 +8,7 @@ module Fusuma
8
8
  module Detectors
9
9
  # Inherite this base
10
10
  class Detector < Base
11
+ #: (String) -> String
11
12
  def self.type(tag_name)
12
13
  tag_name.gsub("_detector", "")
13
14
  end
@@ -9,6 +9,7 @@ module Fusuma
9
9
  # libinput commands wrapper
10
10
  class TimerInput < Input
11
11
  include Singleton
12
+
12
13
  DEFAULT_INTERVAL = 5
13
14
  EPSILON_TIME = 0.02
14
15
  def config_param_types
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fusuma
4
- VERSION = "3.11.1"
4
+ VERSION = "3.11.2"
5
5
  end
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.11.1
4
+ version: 3.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-01-10 00:00:00.000000000 Z
11
+ date: 2026-01-19 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