fusuma-plugin-appmatcher 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d880ea1522a6b2f2aa67f9b687f9622d1fe637fc5cbbfef15b09ee0037018ac5
4
- data.tar.gz: 3c74b91209532a87caeeabcdde66c553db2132fd40cd35c4f3d36016b07f8240
3
+ metadata.gz: e0c42244829fcbe2bd37eb9ebd5241a7208e5702ebfb871645cf0e0d1adba774
4
+ data.tar.gz: 32b934f58a8cda27708778be32f6e48f68b35cb0cae05fadbbfcd3d61459b8a6
5
5
  SHA512:
6
- metadata.gz: 1d182d0ddf35c38dd989ffef4572aa31c0cb94d14f7790d8be4b4aeeaddfed55ad1dd0174f08d4dd38183d6aec78501eb2689077db4b5eb782552db8a501cdc0
7
- data.tar.gz: 2c834a9e51cfa8b4a14f9cd1482fb9d013b5691df446f22b48ffd68744c88839029e028b1f8aef1bb19c4648301a23e22f3d6955d6ad3b5faae1cc5b47cfa473
6
+ metadata.gz: cb40f74760a51e78d3672bec9415ee6235de95f74961cb42e64d4492290bc301a2211ab8d5a949b5bb2720a1516d496cc201a0df8e0a781873ef695e0876ce9d
7
+ data.tar.gz: ebee86ec5a87c274ca3967986ee68188c0dff7c22eb52b5a859fbf1026bd6be16eb5ab0b750e8045cf83b09a125495978c78ea1f795ec9dfe904330cc7b722c1
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Fusuma::Plugin::Appmatcher [![Gem Version](https://badge.fury.io/rb/fusuma-plugin-appmatcher.svg)](https://badge.fury.io/rb/fusuma-plugin-appmatcher) [![Build Status](https://github.com/iberianpig/fusuma/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/iberianpig/fusuma-plugin-appmatcher/actions/workflows/ubuntu.yml)
1
+ # Fusuma::Plugin::Appmatcher [![Gem Version](https://badge.fury.io/rb/fusuma-plugin-appmatcher.svg)](https://badge.fury.io/rb/fusuma-plugin-appmatcher) [![Build Status](https://github.com/iberianpig/fusuma/actions/workflows/main.yml/badge.svg)](https://github.com/iberianpig/fusuma-plugin-appmatcher/actions/workflows/main.yml)
2
2
 
3
3
  [Fusuma](https://github.com/iberianpig/fusuma) plugin configure app-specific gestures
4
4
 
@@ -1,46 +1,45 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'optparse'
5
- require_relative '../lib/fusuma/plugin/appmatcher.rb'
4
+ require "optparse"
5
+ require_relative "../lib/fusuma/plugin/appmatcher"
6
6
 
7
7
  option = {}
8
8
  opt = OptionParser.new
9
9
 
10
- opt.on('-l', '--list-applications',
11
- 'List applications') do |v|
10
+ opt.on("-l", "--list-applications",
11
+ "List applications") do |v|
12
12
  option[:list] = v
13
13
  end
14
14
 
15
- opt.on('--version', 'Show version') do |v|
15
+ opt.on("--version", "Show version") do |v|
16
16
  option[:version] = v
17
17
  end
18
18
 
19
- opt.on('--install-gnome-extension',
20
- 'Install GNOME extension for appmatcher') do |v|
19
+ opt.on("--install-gnome-extension",
20
+ "Install GNOME extension for appmatcher") do |v|
21
21
  option[:install_gnome_extension] = v
22
22
  end
23
23
 
24
- opt.on('--uninstall-gnome-extension',
25
- 'Uninstall GNOME extension for appmatcher') do |v|
24
+ opt.on("--uninstall-gnome-extension",
25
+ "Uninstall GNOME extension for appmatcher") do |v|
26
26
  option[:uninstall_gnome_extension] = v
27
27
  end
28
28
 
29
29
  opt.parse!(ARGV)
30
30
 
31
31
  if option[:install_gnome_extension]
32
- require_relative '../lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb'
32
+ require_relative "../lib/fusuma/plugin/appmatcher/gnome_extensions/installer"
33
33
  Fusuma::Plugin::Appmatcher::GnomeExtensions::Installer.new.install
34
34
  return
35
35
  end
36
36
 
37
37
  if option[:uninstall_gnome_extension]
38
- require_relative '../lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb'
38
+ require_relative "../lib/fusuma/plugin/appmatcher/gnome_extensions/installer"
39
39
  Fusuma::Plugin::Appmatcher::GnomeExtensions::Installer.new.uninstall
40
40
  return
41
41
  end
42
42
 
43
-
44
43
  if option[:list]
45
44
  matcher = Fusuma::Plugin::Appmatcher.backend_klass::Matcher.new
46
45
  puts matcher.running_applications
@@ -49,6 +48,9 @@ end
49
48
 
50
49
  if option[:version]
51
50
  puts Fusuma::Plugin::Appmatcher::VERSION
51
+ puts "XDG_CURRENT_DESKTOP: #{ENV.fetch("XDG_CURRENT_DESKTOP", nil)}"
52
+ puts "XDG_SESSION_TYPE: #{ENV.fetch("XDG_SESSION_TYPE", nil)}"
53
+ puts "Backend: #{Fusuma::Plugin::Appmatcher.backend_klass}"
52
54
  return
53
55
  end
54
56
 
@@ -5,27 +5,27 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require "fusuma/plugin/appmatcher/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = "fusuma-plugin-appmatcher"
9
- spec.version = Fusuma::Plugin::Appmatcher::VERSION
10
- spec.authors = ["iberianpig"]
11
- spec.email = ["yhkyky@gmail.com"]
8
+ spec.name = "fusuma-plugin-appmatcher"
9
+ spec.version = Fusuma::Plugin::Appmatcher::VERSION
10
+ spec.authors = ["iberianpig"]
11
+ spec.email = ["yhkyky@gmail.com"]
12
12
 
13
- spec.summary = "Fusuma plugin to assign gesture mapping per application"
14
- spec.description = "fusuma-plugin-appmatcher is Fusuma plugin for assigning gesture mapping per application."
15
- spec.homepage = "https://github.com/iberianpig/fusuma-plugin-appmatcher"
16
- spec.license = "MIT"
13
+ spec.summary = "Fusuma plugin to assign gesture mapping per application"
14
+ spec.description = "fusuma-plugin-appmatcher is Fusuma plugin for assigning gesture mapping per application."
15
+ spec.homepage = "https://github.com/iberianpig/fusuma-plugin-appmatcher"
16
+ spec.license = "MIT"
17
17
 
18
18
  # Specify which files should be added to the gem when it is released.
19
- spec.files = Dir["{bin,lib,exe}/**/*", "LICENSE*", "README*", "*.gemspec"]
20
- spec.test_files = Dir["{test,spec,features}/**/*"]
21
- spec.bindir = "exe"
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.files = Dir["{bin,lib,exe}/**/*", "LICENSE*", "README*", "*.gemspec"]
20
+ spec.test_files = Dir["{test,spec,features}/**/*"]
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_dependency "rexml" # ruby-dbus doesn't resolve dependency
26
26
  spec.add_runtime_dependency "ruby-dbus"
27
27
 
28
- spec.add_dependency "fusuma", "~> 2.4"
28
+ spec.add_dependency "fusuma", ">= 3.0"
29
29
  spec.metadata["rubygems_mfa_required"] = "true"
30
30
 
31
31
  spec.required_ruby_version = ">= 2.5.1" # https://packages.ubuntu.com/search?keywords=ruby&searchon=names&exact=1&suite=all&section=main
@@ -9,7 +9,9 @@ module Fusuma
9
9
  module Appmatcher
10
10
  # Search Active Window's Name
11
11
  class Gnome
12
- attr_reader :matcher, :reader, :writer
12
+ include UserSwitcher
13
+
14
+ attr_reader :reader, :writer
13
15
 
14
16
  def initialize
15
17
  @reader, @writer = IO.pipe
@@ -19,12 +21,11 @@ module Fusuma
19
21
  # @return [Integer] Process id
20
22
  def watch_start
21
23
  @watch_start ||= begin
22
- pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
24
+ pid = as_user(proctitle: self.class.name.underscore) do |user|
23
25
  @reader.close
24
26
  ENV["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/run/user/#{user.uid}/bus"
25
27
  register_on_application_changed(Matcher.new)
26
28
  end
27
- Process.detach(pid)
28
29
  pid
29
30
  end
30
31
  end
@@ -41,7 +42,7 @@ module Fusuma
41
42
  @writer.puts(name)
42
43
  rescue Errno::EPIPE
43
44
  exit 0
44
- rescue StandardError => e
45
+ rescue => e
45
46
  MultiLogger.error e.message
46
47
  exit 1
47
48
  end
@@ -101,7 +102,7 @@ module Fusuma
101
102
  if success
102
103
  response = begin
103
104
  JSON.parse(body)
104
- rescue StandardError
105
+ rescue
105
106
  nil
106
107
  end
107
108
  return response
@@ -9,7 +9,9 @@ module Fusuma
9
9
  module Appmatcher
10
10
  # Search Active Window's Name
11
11
  class GnomeExtension
12
- attr_reader :matcher, :reader, :writer
12
+ include UserSwitcher
13
+
14
+ attr_reader :reader, :writer
13
15
 
14
16
  def initialize
15
17
  @reader, @writer = IO.pipe
@@ -19,12 +21,11 @@ module Fusuma
19
21
  # @return [Integer] Process id
20
22
  def watch_start
21
23
  @watch_start ||= begin
22
- pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
24
+ pid = as_user(proctitle: self.class.name.underscore) do |user|
23
25
  @reader.close
24
26
  ENV["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/run/user/#{user.uid}/bus"
25
27
  register_on_application_changed(Matcher.new)
26
28
  end
27
- Process.detach(pid)
28
29
  pid
29
30
  end
30
31
  end
@@ -47,7 +48,7 @@ module Fusuma
47
48
  @writer.puts(name)
48
49
  rescue Errno::EPIPE
49
50
  exit 0
50
- rescue StandardError => e
51
+ rescue => e
51
52
  MultiLogger.error e.message
52
53
  exit 1
53
54
  end
@@ -9,10 +9,12 @@ module Fusuma
9
9
  module GnomeExtensions
10
10
  # Install Gnome Extension
11
11
  class Installer
12
+ include UserSwitcher
13
+
12
14
  EXTENSION = "./appmatcher@iberianpig.dev"
13
15
 
14
16
  def install
15
- pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
17
+ pid = as_user(proctitle: self.class.name.underscore) do |user|
16
18
  FileUtils.cp_r(source_path, user_extension_dir(user.username))
17
19
  puts "Installed Appmatcher Gnome Shell Extension to #{user_extension_dir(user.username)}"
18
20
  puts "Restart your session, then activate Appmatcher on gnome-extensions-app"
@@ -23,7 +25,7 @@ module Fusuma
23
25
  def uninstall
24
26
  return puts "Appmatcher Gnome Shell Extension is not installed in #{user_extension_dir}/" unless installed?
25
27
 
26
- pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
28
+ pid = as_user(proctitle: self.class.name.underscore) do |user|
27
29
  FileUtils.rm_r(install_path(user.username))
28
30
  puts "Uninstalled Appmatcher Gnome Shell Extension from #{install_path(user.username)}"
29
31
  end
@@ -49,7 +51,7 @@ module Fusuma
49
51
  end
50
52
 
51
53
  def login_username
52
- UserSwitcher.new.login_user.username
54
+ UserSwitcher.login_user.username
53
55
  end
54
56
  end
55
57
  end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "open3"
4
+ require_relative "./user_switcher"
5
+ require "fusuma/multi_logger"
6
+ require "fusuma/custom_process"
7
+
8
+ module Fusuma
9
+ module Plugin
10
+ module Appmatcher
11
+ # Dummy for unsupported Backend
12
+ class UnsupportedBackend
13
+ include UserSwitcher
14
+
15
+ attr_reader :reader, :writer
16
+
17
+ def initialize
18
+ # need IO object for IO.select()
19
+ @reader, @writer = IO.pipe
20
+ end
21
+
22
+ # fork process and watch signal
23
+ # @return [Integer] Process id
24
+ def watch_start
25
+ @watch_start ||= begin
26
+ pid = as_user(proctitle: self.class.name.underscore) do
27
+ @reader.close
28
+ sleep # stop indefinitely without using CPU
29
+ end
30
+ pid
31
+ end
32
+ end
33
+
34
+ class Matcher
35
+ def initialize
36
+ end
37
+
38
+ def running_applications
39
+ warn
40
+ nil
41
+ end
42
+
43
+ def active_application
44
+ warn
45
+ nil
46
+ end
47
+
48
+ private
49
+
50
+ def warn
51
+ MultiLogger.warn(
52
+ <<~MSG
53
+ appmatcher doesn't support
54
+ XDG_CURRENT_DESKTOP: '#{Appmatcher.xdg_current_desktop}'
55
+ XDG_SESSION_TYPE: '#{Appmatcher.xdg_session_type}'
56
+
57
+ using dummy backend instead
58
+ MSG
59
+ )
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -7,18 +7,8 @@ module Fusuma
7
7
  module Plugin
8
8
  module Appmatcher
9
9
  # Drop sudo privileges
10
- class UserSwitcher
10
+ module UserSwitcher
11
11
  include CustomProcess
12
- User = Struct.new(:username, :uid, :gid)
13
-
14
- attr_reader :login_user
15
-
16
- def initialize
17
- username = ENV["SUDO_USER"] || Etc.getlogin
18
- uid = `id -u #{username}`.chomp.to_i
19
- gid = `id -g #{username}`.chomp.to_i
20
- @login_user = User.new(username, uid, gid)
21
- end
22
12
 
23
13
  # Drops privileges to that of the specified user
24
14
  def drop_priv(user)
@@ -30,7 +20,7 @@ module Fusuma
30
20
 
31
21
  # Execute the provided block in a child process as the specified user
32
22
  # The parent blocks until the child finishes.
33
- def as_user(user = @login_user, proctitle:)
23
+ def as_user(user = login_user, proctitle:)
34
24
  self.proctitle = "#{self.class.name.underscore}(#{user.username}) -> #{proctitle}"
35
25
 
36
26
  fork do
@@ -38,6 +28,17 @@ module Fusuma
38
28
  yield(user) if block_given?
39
29
  end
40
30
  end
31
+
32
+ User = Struct.new(:username, :uid, :gid)
33
+ def login_user
34
+ @login_user ||= begin
35
+ username = ENV["SUDO_USER"] || Etc.getlogin
36
+ uid = `id -u #{username}`.chomp.to_i
37
+ gid = `id -g #{username}`.chomp.to_i
38
+ User.new(username, uid, gid)
39
+ end
40
+ end
41
+ module_function :login_user
41
42
  end
42
43
  end
43
44
  end
@@ -3,7 +3,7 @@
3
3
  module Fusuma
4
4
  module Plugin
5
5
  module Appmatcher
6
- VERSION = "0.4.0"
6
+ VERSION = "0.5.0"
7
7
  end
8
8
  end
9
9
  end
@@ -10,7 +10,9 @@ module Fusuma
10
10
  module Appmatcher
11
11
  # Search Active Window's Name
12
12
  class X11
13
- attr_reader :matcher, :reader, :writer
13
+ include UserSwitcher
14
+
15
+ attr_reader :reader, :writer
14
16
 
15
17
  def initialize
16
18
  @reader, @writer = IO.pipe
@@ -20,11 +22,10 @@ module Fusuma
20
22
  # @return [Integer] Process id
21
23
  def watch_start
22
24
  @watch_start ||= begin
23
- pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |_user|
25
+ pid = as_user(proctitle: self.class.name.underscore) do |_user|
24
26
  @reader.close
25
27
  register_on_application_changed(Matcher.new)
26
28
  end
27
- Process.detach(pid)
28
29
  pid
29
30
  end
30
31
  end
@@ -41,7 +42,7 @@ module Fusuma
41
42
  @writer.puts(name)
42
43
  rescue Errno::EPIPE
43
44
  exit 0
44
- rescue StandardError => e
45
+ rescue => e
45
46
  MultiLogger.error e.message
46
47
  exit 1
47
48
  end
@@ -51,8 +52,8 @@ module Fusuma
51
52
  # @return [Array<String>]
52
53
  def running_applications
53
54
  `xprop -root _NET_CLIENT_LIST_STACKING`.split(", ")
54
- .map { |id_str| id_str.match(/0x[\da-z]{2,}/).to_s }
55
- .map { |id| active_application(id) }
55
+ .map { |id_str| id_str.match(/0x[\da-z]{2,}/).to_s }
56
+ .map { |id| active_application(id) }
56
57
  end
57
58
 
58
59
  # @return [String]
@@ -60,10 +61,10 @@ module Fusuma
60
61
  def active_application(id = active_window_id)
61
62
  @cache ||= {}
62
63
  @cache[id] ||= if id.nil?
63
- nil
64
- else
65
- `xprop -id #{id} WM_CLASS | cut -d "=" -f 2 | tr -d '"'`.strip.split(", ").last
66
- end
64
+ nil
65
+ else
66
+ `xprop -id #{id} WM_CLASS | cut -d "=" -f 2 | tr -d '"'`.strip.split(", ").last
67
+ end
67
68
  end
68
69
 
69
70
  def on_active_application_changed
@@ -80,7 +81,7 @@ module Fusuma
80
81
  o.each do |line|
81
82
  id = line.match(/0x[\da-z]{2,}/)&.to_s
82
83
 
83
- return id unless block_given?
84
+ return id unless block
84
85
 
85
86
  yield(id)
86
87
  end
@@ -88,11 +89,11 @@ module Fusuma
88
89
  e.close
89
90
  o.close
90
91
 
91
- return nil unless block_given?
92
+ return nil unless block
92
93
 
93
94
  sleep 0.5
94
95
  active_window_id(watch: watch, &block)
95
- rescue StandardError => e
96
+ rescue => e
96
97
  MultiLogger.error e.message
97
98
  end
98
99
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  require "fusuma/plugin/appmatcher/version"
4
4
 
5
- require_relative "appmatcher/x11"
6
- require_relative "appmatcher/gnome"
7
- require_relative "appmatcher/gnome_extension"
8
- require_relative "appmatcher/gnome_extensions/installer"
5
+ require "fusuma/plugin/appmatcher/x11"
6
+ require "fusuma/plugin/appmatcher/gnome"
7
+ require "fusuma/plugin/appmatcher/gnome_extension"
8
+ require "fusuma/plugin/appmatcher/gnome_extensions/installer"
9
+ require "fusuma/plugin/appmatcher/unsupported_backend"
9
10
 
10
11
  module Fusuma
11
12
  module Plugin
@@ -27,8 +28,7 @@ module Fusuma
27
28
  end
28
29
  end
29
30
 
30
- error_message_not_supported
31
- exit 1
31
+ UnsupportedBackend
32
32
  end
33
33
 
34
34
  def xdg_session_type
@@ -38,16 +38,6 @@ module Fusuma
38
38
  def xdg_current_desktop
39
39
  ENV.fetch("XDG_CURRENT_DESKTOP", "")
40
40
  end
41
-
42
- def error_message_not_supported
43
- MultiLogger.error(
44
- <<~ERROR
45
- appmatcher doesn't support
46
- XDG_CURRENT_DESKTOP: '#{xdg_current_desktop}'
47
- XDG_SESSION_TYPE: '#{xdg_session_type}'"
48
- ERROR
49
- )
50
- end
51
41
  end
52
42
  end
53
43
  end
@@ -5,7 +5,7 @@ module Fusuma
5
5
  module Buffers
6
6
  # Buffer events having KeypressRecord
7
7
  class AppmatcherBuffer < Buffer
8
- DEFAULT_SOURCE = "appmatcher_parser"
8
+ DEFAULT_SOURCE = "appmatcher_input"
9
9
 
10
10
  # @param event [Event]
11
11
  def buffer(event)
@@ -22,6 +22,22 @@ module Fusuma
22
22
 
23
23
  @backend.reader
24
24
  end
25
+
26
+ def shutdown
27
+ # CustomProcess#shutdown
28
+ @backend.shutdown
29
+ end
30
+
31
+ # @param record [String] application name
32
+ # @return [Event]
33
+ def create_event(record:)
34
+ e = Events::Event.new(
35
+ tag: tag,
36
+ record: Events::Records::AppmatcherRecord.new(name: record)
37
+ )
38
+ MultiLogger.debug(input_event: e)
39
+ e
40
+ end
25
41
  end
26
42
  end
27
43
  end
@@ -42,7 +42,7 @@ module Fusuma
42
42
  allow(Appmatcher).to receive(:xdg_current_desktop).and_return("UNKNOWN")
43
43
  allow(MultiLogger).to receive(:error)
44
44
  end
45
- it { expect { subject }.to raise_error(SystemExit) }
45
+ it { is_expected.to eq Appmatcher::UnsupportedBackend }
46
46
  end
47
47
  end
48
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma-plugin-appmatcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - iberianpig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-30 00:00:00.000000000 Z
11
+ date: 2023-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rexml
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: fusuma
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.4'
47
+ version: '3.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.4'
54
+ version: '3.0'
55
55
  description: fusuma-plugin-appmatcher is Fusuma plugin for assigning gesture mapping
56
56
  per application.
57
57
  email:
@@ -73,6 +73,7 @@ files:
73
73
  - lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher@iberianpig.dev/extension.js
74
74
  - lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher@iberianpig.dev/metadata.json
75
75
  - lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb
76
+ - lib/fusuma/plugin/appmatcher/unsupported_backend.rb
76
77
  - lib/fusuma/plugin/appmatcher/user_switcher.rb
77
78
  - lib/fusuma/plugin/appmatcher/version.rb
78
79
  - lib/fusuma/plugin/appmatcher/x11.rb
@@ -80,7 +81,6 @@ files:
80
81
  - lib/fusuma/plugin/detectors/appmatcher_detector.rb
81
82
  - lib/fusuma/plugin/events/records/appmatcher_record.rb
82
83
  - lib/fusuma/plugin/inputs/appmatcher_input.rb
83
- - lib/fusuma/plugin/parsers/appmatcher_parser.rb
84
84
  - spec/fusuma/plugin/appmatcher/gnome_extensions/installer_spec.rb
85
85
  - spec/fusuma/plugin/appmatcher/gnome_spec.rb
86
86
  - spec/fusuma/plugin/appmatcher_spec.rb
@@ -106,13 +106,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.0.3.1
109
+ rubygems_version: 3.3.26
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Fusuma plugin to assign gesture mapping per application
113
113
  test_files:
114
- - spec/fusuma/plugin/appmatcher_spec.rb
115
114
  - spec/fusuma/plugin/appmatcher/gnome_extensions/installer_spec.rb
116
115
  - spec/fusuma/plugin/appmatcher/gnome_spec.rb
116
+ - spec/fusuma/plugin/appmatcher_spec.rb
117
117
  - spec/fusuma/plugin/detectors/appmatcher_detector_spec.rb
118
118
  - spec/spec_helper.rb
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Fusuma
4
- module Plugin
5
- module Parsers
6
- # Generate AppmatcherRecord from libinput_command_input
7
- class AppmatcherParser < Parser
8
- DEFAULT_SOURCE = "appmatcher_input"
9
-
10
- # @param record [String]
11
- # @return [Records::Gesture, nil]
12
- def parse_record(record)
13
- line = record.to_s
14
- Events::Records::AppmatcherRecord.new(name: line)
15
- end
16
- end
17
- end
18
- end
19
- end