fusuma-plugin-appmatcher 0.2.3 → 0.4.0
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/metadata.json +2 -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
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d880ea1522a6b2f2aa67f9b687f9622d1fe637fc5cbbfef15b09ee0037018ac5
|
4
|
+
data.tar.gz: 3c74b91209532a87caeeabcdde66c553db2132fd40cd35c4f3d36016b07f8240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d182d0ddf35c38dd989ffef4572aa31c0cb94d14f7790d8be4b4aeeaddfed55ad1dd0174f08d4dd38183d6aec78501eb2689077db4b5eb782552db8a501cdc0
|
7
|
+
data.tar.gz: 2c834a9e51cfa8b4a14f9cd1482fb9d013b5691df446f22b48ffd68744c88839029e028b1f8aef1bb19c4648301a23e22f3d6955d6ad3b5faae1cc5b47cfa473
|
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)
|
@@ -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
|
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.4.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-30 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:
|