lib/fusuma/plugin/inputs/libinput_command_input.rb in fusuma-2.0.0.pre vs lib/fusuma/plugin/inputs/libinput_command_input.rb in fusuma-2.0.0.pre2
- old
+ new
@@ -1,29 +1,34 @@
# frozen_string_literal: true
-require_relative '../../libinput_command.rb'
-require_relative './input.rb'
+require_relative '../../libinput_command'
+require_relative './input'
module Fusuma
module Plugin
module Inputs
# libinput commands wrapper
class LibinputCommandInput < Input
+ attr_reader :pid
+
def config_param_types
{
- 'device': [String],
+ device: [String],
'enable-dwt': [TrueClass, FalseClass],
'enable-tap': [TrueClass, FalseClass],
'show-keycodes': [TrueClass, FalseClass],
- 'verbose': [TrueClass, FalseClass],
+ verbose: [TrueClass, FalseClass],
'libinput-debug-events': [String],
'libinput-list-devices': [String]
}
end
# @return [IO]
def io
- @io ||= command.debug_events
+ @io ||= begin
+ @pid, io = command.debug_events
+ io
+ end
end
# @return [LibinputCommand]
def command
@command ||= LibinputCommand.new(