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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7821bcc57ed92ff1ab9a45afc0e760dec0e852678b2db2a0c6d8cb6b39604ba8
4
- data.tar.gz: 4d335957d70eee1cb86294a3f57219020cbf42b713dc105c91ae205ed6677ee0
3
+ metadata.gz: d880ea1522a6b2f2aa67f9b687f9622d1fe637fc5cbbfef15b09ee0037018ac5
4
+ data.tar.gz: 3c74b91209532a87caeeabcdde66c553db2132fd40cd35c4f3d36016b07f8240
5
5
  SHA512:
6
- metadata.gz: fc4ccfbb2450075a702f9909bebbf5be21650b44794e07f71720a39abd80a221c27b59b39d958ecc37c54c2c8c9b2bf81df04417d8cbdd9a4641f4bd26fc774c
7
- data.tar.gz: bf37777c2cb5304aa59b8a66c1cb788fc8ef923f5cda1ca5020eb39991fa07156786e6aaa7ff6bc0245c98060bcf0abe1baa7a1e568a4e2795114f390d05d1bb
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.3"
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&section=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)
@@ -5,7 +5,8 @@
5
5
  "3.36",
6
6
  "3.38",
7
7
  "40",
8
- "41"
8
+ "41",
9
+ "42"
9
10
  ],
10
11
  "url" : "https://github.com/iberianpig/fusuma-plugin-appmatcher",
11
12
  "uuid": "appmatcher@iberianpig.dev",
@@ -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?
@@ -3,7 +3,7 @@
3
3
  module Fusuma
4
4
  module Plugin
5
5
  module Appmatcher
6
- VERSION = "0.2.3"
6
+ VERSION = "0.4.0"
7
7
  end
8
8
  end
9
9
  end
@@ -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.2.3
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-02-20 00:00:00.000000000 Z
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.3'
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.3'
54
+ version: '2.4'
55
55
  description: fusuma-plugin-appmatcher is Fusuma plugin for assigning gesture mapping
56
56
  per application.
57
57
  email: