fusuma-plugin-appmatcher 0.2.1 → 0.3.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/fusuma-plugin-appmatcher.gemspec +1 -1
- data/lib/fusuma/plugin/appmatcher/gnome.rb +1 -1
- data/lib/fusuma/plugin/appmatcher/gnome_extension.rb +1 -1
- data/lib/fusuma/plugin/appmatcher/gnome_extensions/appmatcher@iberianpig.dev/extension.js +1 -1
- data/lib/fusuma/plugin/appmatcher/gnome_extensions/installer.rb +1 -1
- data/lib/fusuma/plugin/appmatcher/user_switcher.rb +3 -2
- data/lib/fusuma/plugin/appmatcher/version.rb +1 -1
- data/lib/fusuma/plugin/appmatcher/x11.rb +1 -1
- data/spec/fusuma/plugin/{inputs → detectors}/appmatcher_detector_spec.rb +0 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b6ea8ac192ef5d055ffc2e4beb7cb25372bd7e64d98ca35baf36048de193e1
|
4
|
+
data.tar.gz: d6e80545db2dafcf6d4cfe457fdb05fd18956d7a559075d3b1e5eabf6376381e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 937cba2d82214e6de5fc94d992096a69f4d5fa9bf32d703e2cd99e903084528fc583561bb9ef09eda60bc195ea412d57deccab0c9fb813f856d82426752ac193
|
7
|
+
data.tar.gz: 2c7e232589175f6e26a2150f5a99a80c19a589e6e38ea7565717b82b67b1e2f2cc5299bb637258d602890a317cea648e8d66bfebdc8eabadeabe49f2feb53a8b
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
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.
|
28
|
+
spec.add_dependency "fusuma", "~> 2.4"
|
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§ion=main
|
@@ -19,7 +19,7 @@ module Fusuma
|
|
19
19
|
# @return [Integer] Process id
|
20
20
|
def watch_start
|
21
21
|
@watch_start ||= begin
|
22
|
-
pid = UserSwitcher.new.as_user do |user|
|
22
|
+
pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
|
23
23
|
@reader.close
|
24
24
|
ENV["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/run/user/#{user.uid}/bus"
|
25
25
|
register_on_application_changed(Matcher.new)
|
@@ -19,7 +19,7 @@ module Fusuma
|
|
19
19
|
# @return [Integer] Process id
|
20
20
|
def watch_start
|
21
21
|
@watch_start ||= begin
|
22
|
-
pid = UserSwitcher.new.as_user do |user|
|
22
|
+
pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
|
23
23
|
@reader.close
|
24
24
|
ENV["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=/run/user/#{user.uid}/bus"
|
25
25
|
register_on_application_changed(Matcher.new)
|
@@ -59,7 +59,7 @@ class Extension {
|
|
59
59
|
|
60
60
|
ActiveWindow() {
|
61
61
|
const actor = global.get_window_actors().find(a=>a.meta_window.has_focus()===true)
|
62
|
-
if(!actor) { return; }
|
62
|
+
if(!actor) { return '{}'; }
|
63
63
|
const w = actor.get_meta_window()
|
64
64
|
try {
|
65
65
|
const obj = { wm_class: w.get_wm_class(), pid: w.get_pid(), id: w.get_id(), title: w.get_title(), focus: w.has_focus()}
|
@@ -23,7 +23,7 @@ module Fusuma
|
|
23
23
|
def uninstall
|
24
24
|
return puts "Appmatcher Gnome Shell Extension is not installed in #{user_extension_dir}/" unless installed?
|
25
25
|
|
26
|
-
pid = UserSwitcher.new.as_user do |user|
|
26
|
+
pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
|
27
27
|
FileUtils.rm_r(install_path(user.username))
|
28
28
|
puts "Uninstalled Appmatcher Gnome Shell Extension from #{install_path(user.username)}"
|
29
29
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "fusuma/string_support" # This line is not required for Fusuma 2.3 and later.
|
4
3
|
require "fusuma/custom_process"
|
5
4
|
require "etc"
|
6
5
|
|
@@ -31,7 +30,9 @@ module Fusuma
|
|
31
30
|
|
32
31
|
# Execute the provided block in a child process as the specified user
|
33
32
|
# The parent blocks until the child finishes.
|
34
|
-
def as_user(user = @login_user)
|
33
|
+
def as_user(user = @login_user, proctitle:)
|
34
|
+
self.proctitle = "#{self.class.name.underscore}(#{user.username}) -> #{proctitle}"
|
35
|
+
|
35
36
|
fork do
|
36
37
|
drop_priv(user)
|
37
38
|
yield(user) if block_given?
|
@@ -20,7 +20,7 @@ module Fusuma
|
|
20
20
|
# @return [Integer] Process id
|
21
21
|
def watch_start
|
22
22
|
@watch_start ||= begin
|
23
|
-
pid = UserSwitcher.new.as_user do |_user|
|
23
|
+
pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |_user|
|
24
24
|
@reader.close
|
25
25
|
register_on_application_changed(Matcher.new)
|
26
26
|
end
|
File without changes
|
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
|
+
version: 0.3.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-
|
11
|
+
date: 2022-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rexml
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.4'
|
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.
|
54
|
+
version: '2.4'
|
55
55
|
description: fusuma-plugin-appmatcher is Fusuma plugin for assigning gesture mapping
|
56
56
|
per application.
|
57
57
|
email:
|
@@ -84,7 +84,7 @@ files:
|
|
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
|
87
|
-
- spec/fusuma/plugin/
|
87
|
+
- spec/fusuma/plugin/detectors/appmatcher_detector_spec.rb
|
88
88
|
- spec/spec_helper.rb
|
89
89
|
homepage: https://github.com/iberianpig/fusuma-plugin-appmatcher
|
90
90
|
licenses:
|
@@ -112,7 +112,7 @@ specification_version: 4
|
|
112
112
|
summary: Fusuma plugin to assign gesture mapping per application
|
113
113
|
test_files:
|
114
114
|
- spec/fusuma/plugin/appmatcher_spec.rb
|
115
|
-
- spec/fusuma/plugin/inputs/appmatcher_detector_spec.rb
|
116
115
|
- spec/fusuma/plugin/appmatcher/gnome_extensions/installer_spec.rb
|
117
116
|
- spec/fusuma/plugin/appmatcher/gnome_spec.rb
|
117
|
+
- spec/fusuma/plugin/detectors/appmatcher_detector_spec.rb
|
118
118
|
- spec/spec_helper.rb
|