xinput_wrapperplus 0.4.3 → 0.5.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
- checksums.yaml.gz.sig +0 -0
- data/lib/xinput_wrapperplus.rb +20 -5
- data.tar.gz.sig +0 -0
- metadata +47 -26
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7895cc28fe6d61322a6ec002f8dcded48d448c5dea63b4264181d9cd4a06a6f
|
4
|
+
data.tar.gz: 6368b33575a4e730fc58e42cdd4b4f50ed9ce728061bbb073f9ad30a28c65822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d621312320338465c881475f038054a758f43666469295bf4f572dadb23a299d64a673ce66ce8aab1777d85aefe896711c9df8f2f9a242d40d2e6f2912e6cd
|
7
|
+
data.tar.gz: 5932216f417c697613ede7355ed9b30e42e50479e21f5e679f6913a52aa4137b522ace656aedb8e3935509408d3abd1fe842d7c57896f8dec910967d890dca3c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/xinput_wrapperplus.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# file: xinput_wrapperplus.rb
|
4
4
|
|
5
5
|
|
6
|
+
require 'wmctrl'
|
6
7
|
require 'sps-pub'
|
7
8
|
require 'secret_knock'
|
8
9
|
require 'xinput_wrapper'
|
@@ -12,7 +13,8 @@ class XInputWrapperPlus < XInputWrapper
|
|
12
13
|
def initialize(host: 'sps', port: '59000',
|
13
14
|
topic: 'input', verbose: true, lookup: {},
|
14
15
|
debug: false, capture_all: false, keys: [],
|
15
|
-
keypress_detection: true, motion_detection: true
|
16
|
+
keypress_detection: true, motion_detection: true,
|
17
|
+
window_context: false)
|
16
18
|
|
17
19
|
puts 'before super'
|
18
20
|
super(verbose: verbose, lookup: lookup,
|
@@ -22,15 +24,17 @@ class XInputWrapperPlus < XInputWrapper
|
|
22
24
|
@topic, @capture_all = topic, capture_all
|
23
25
|
@keypress_detection = keypress_detection
|
24
26
|
@motion_detection = motion_detection
|
27
|
+
@window_context = window_context
|
25
28
|
|
26
29
|
@sps = SPSPub.new host: host, port: port
|
27
30
|
|
28
31
|
@sk = SecretKnock.new short_delay: 0.25, long_delay: 0.5,
|
29
32
|
external: self, verbose: verbose, debug: debug
|
30
33
|
@sk.detect timeout: 0.7
|
34
|
+
@interval = 120
|
31
35
|
|
32
36
|
@a = [] # Used to store mouse gestures
|
33
|
-
@timer, @t2 = nil , Time.now -
|
37
|
+
@timer, @t2 = nil , Time.now - @interval
|
34
38
|
|
35
39
|
end
|
36
40
|
|
@@ -46,7 +50,18 @@ class XInputWrapperPlus < XInputWrapper
|
|
46
50
|
|
47
51
|
topic = [@topic, subtopic].compact.join('/')
|
48
52
|
|
49
|
-
@
|
53
|
+
if @window_context then
|
54
|
+
|
55
|
+
wm = WMCtrl.display
|
56
|
+
win = wm.windows.find {|x| x.active}
|
57
|
+
|
58
|
+
@sps.notice "%s: %s in %s" % [topic, msg, win.title]
|
59
|
+
|
60
|
+
else
|
61
|
+
|
62
|
+
@sps.notice "%s: %s" % [topic, msg]
|
63
|
+
|
64
|
+
end
|
50
65
|
|
51
66
|
end
|
52
67
|
|
@@ -54,7 +69,7 @@ class XInputWrapperPlus < XInputWrapper
|
|
54
69
|
|
55
70
|
def anykey_press()
|
56
71
|
|
57
|
-
if @keypress_detection and (Time.now > @t2 +
|
72
|
+
if @keypress_detection and (Time.now > @t2 + @interval) then
|
58
73
|
message 'keypress detected', nil
|
59
74
|
@t2 = Time.now
|
60
75
|
end
|
@@ -90,7 +105,7 @@ class XInputWrapperPlus < XInputWrapper
|
|
90
105
|
puts "on_mousemove() x: %s y: %s" % [x, y]
|
91
106
|
end
|
92
107
|
|
93
|
-
if @motion_detection and (Time.now > @t2 +
|
108
|
+
if @motion_detection and (Time.now > @t2 + @interval) then
|
94
109
|
message 'motion detected', nil
|
95
110
|
@t2 = Time.now
|
96
111
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xinput_wrapperplus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,32 +11,52 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjExMDIwMjE0NTAxWhcN
|
15
|
+
MjIxMDIwMjE0NTAxWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDToY1O
|
17
|
+
pXBMvrOeQQ+WsEh1bdzbNsZ6H00RGjnrRd5sH4w7B6NtrtWL5lqvVh82H54kUrLC
|
18
|
+
THtj0dKXeMeau/0SrWnAkmCoYvo9fkhU/HolRuQj3y4IlTQt7yVMV3Gs2T9PZBd1
|
19
|
+
4qkjk6AMxpl32J2feUTHxEULQYbpUU+4uxzVfvc5LUmGuCuirqFSTxp/tHgLBAtJ
|
20
|
+
SH56z9Lb8pUO+YDFTocPuhAtlHVs+RkgRhcu2xubwveuJkBFPwSu40LqWOdm0Wrr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jumXRnWXhpndrJ0xgg9eDd+GT4VZd9hrp8c8XhV/G79MQ
|
35
|
+
u085o8gsCVOJC4P40gYteNm1nfOXtueJsOiLWvvwVUPNWEclrXGotC6M9oQ05tIw
|
36
|
+
WRJtwtBTRvaGT4z1I+tAttJt
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2021-10-20 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: ruby-wmctrl
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.0'
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 0.0.8
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0.0'
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.0.8
|
40
60
|
- !ruby/object:Gem::Dependency
|
41
61
|
name: sps-pub
|
42
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +118,7 @@ dependencies:
|
|
98
118
|
- !ruby/object:Gem::Version
|
99
119
|
version: 0.8.1
|
100
120
|
description:
|
101
|
-
email:
|
121
|
+
email: digital.robertson@gmail.com
|
102
122
|
executables: []
|
103
123
|
extensions: []
|
104
124
|
extra_rdoc_files: []
|
@@ -123,7 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
143
|
- !ruby/object:Gem::Version
|
124
144
|
version: '0'
|
125
145
|
requirements: []
|
126
|
-
|
146
|
+
rubyforge_project:
|
147
|
+
rubygems_version: 2.7.10
|
127
148
|
signing_key:
|
128
149
|
specification_version: 4
|
129
150
|
summary: A wrapper for the Linux utility xinput. Publishes an SPS message whenever
|
metadata.gz.sig
CHANGED
Binary file
|