fusuma-plugin-appmatcher 0.2.2 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- 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 +2 -2
- data/lib/fusuma/plugin/appmatcher/user_switcher.rb +3 -1
- 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: 45dca7f770ca66f950cb780c7f2667acb50444a579e9c91d0edaa15aaa5fc08a
|
4
|
+
data.tar.gz: c75656b26dcc9400397872b76b5fd19e9339751701fbdc79f3ea01633d76b207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 619dd9d0f3dd918b453896af0405c2dcf8997d181b92dbef7e6660cd1adb5d4dfd1e79b5f54487281dae40d8c1c0bb1399b433692a17d91734d3bcea4ab49532
|
7
|
+
data.tar.gz: e61371cfe8684ac0428c166bca8785b83c518a50b57eba1b443d198db7ec318abc645716c223b7db88e17017d15ae52141104a0183aa4780f3e538ebda3b3c0a
|
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/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/ubuntu.yml/badge.svg)](https://github.com/iberianpig/fusuma-plugin-appmatcher/actions/workflows/ubuntu.yml)
|
2
2
|
|
3
3
|
[Fusuma](https://github.com/iberianpig/fusuma) plugin configure app-specific gestures
|
4
4
|
|
@@ -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()}
|
@@ -12,7 +12,7 @@ module Fusuma
|
|
12
12
|
EXTENSION = "./appmatcher@iberianpig.dev"
|
13
13
|
|
14
14
|
def install
|
15
|
-
pid = UserSwitcher.new.as_user do |user|
|
15
|
+
pid = UserSwitcher.new.as_user(proctitle: self.class.name.underscore) do |user|
|
16
16
|
FileUtils.cp_r(source_path, user_extension_dir(user.username))
|
17
17
|
puts "Installed Appmatcher Gnome Shell Extension to #{user_extension_dir(user.username)}"
|
18
18
|
puts "Restart your session, then activate Appmatcher on gnome-extensions-app"
|
@@ -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
|
@@ -30,7 +30,9 @@ module Fusuma
|
|
30
30
|
|
31
31
|
# Execute the provided block in a child process as the specified user
|
32
32
|
# The parent blocks until the child finishes.
|
33
|
-
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
|
+
|
34
36
|
fork do
|
35
37
|
drop_priv(user)
|
36
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.1
|
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-23 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
|