clipboard_manager 4.1.230115 → 4.2.230117

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b96ba3d75015dd40d59ea3efa098d6d090b81e458ed5d0a57dfbdbba3727632
4
- data.tar.gz: 35ea53a9adc2ae3909576bfc2a205a830f9d75ecebf41a7f4462fc30eb99d52a
3
+ metadata.gz: fa76932e386e569c94ee74414fc52cda287df0ff492b71e685022b27e5a9f0d2
4
+ data.tar.gz: 29b11811b2c3b8eb16f32351b9193cca5d536b48fe1a45084f893237b8d9a5b5
5
5
  SHA512:
6
- metadata.gz: '0481924b166c53ba75bf99aac65d8a071ee4da07fd66d14a56c63fe77fd6777644b0118c5831f7c6d9adff0630b7166effee906fb4ee1df3f5e046d1ddb071df'
7
- data.tar.gz: e93addef2f37e550069e10899bc08208c85faf769217f927006c6f343cc286b17170eb5a4e61ee0319050f4851d3fc3c70d4b52c634872be9120620ceb7ccefc
6
+ metadata.gz: 7dd3b90711b076e6b67105ac6bc603dc53ee920d38362f17e25eb59565264e9c72746baf6172c30454ce057d038a94a4eeff363529c7d38079d6663abbf673b4
7
+ data.tar.gz: cd39d59ef86d9102deca56430e07f67cd32c079209043955257943da45f70bb6c3f6d4fd121c46f5cb08f1045655f4f0fae422f42eb06a4e7f2650f564f109a4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ClipboardManager
2
2
 
3
- * [VERSION 4.1.230115](https://github.com/carlosjhr64/clipboard_manager/releases)
3
+ * [VERSION 4.2.230117](https://github.com/carlosjhr64/clipboard_manager/releases)
4
4
  * [github](https://github.com/carlosjhr64/clipboard_manager)
5
5
  * [rubygems](https://rubygems.org/gems/clipboard_manager)
6
6
 
@@ -28,6 +28,12 @@ Also:
28
28
  ```shell
29
29
  $ gem install clipboard_manager
30
30
  ```
31
+ ## MOUSE CLICKS ON LOGO:
32
+
33
+ + Button #1: Toggle Minime
34
+ + Button #2: Toggle On/Off
35
+ + Button #3: Pop-up Application Menu
36
+
31
37
  ## CONFIGURATION:
32
38
 
33
39
  After an initial run, your user configuration will found in:
@@ -55,7 +61,7 @@ At top of the file you will find the available tasks:
55
61
  true
56
62
  ],
57
63
  espeak: [
58
- ".{80,}",
64
+ ".{40,}",
59
65
  :espeak,
60
66
  true
61
67
  ]
@@ -107,6 +107,15 @@ class ClipboardManager
107
107
  end
108
108
 
109
109
  Gtk3App.clipboard_manager_hook(self)
110
+ Gtk3App.logo_press_event do |button|
111
+ case button
112
+ when 1
113
+ Gtk3App.minime!
114
+ when 2
115
+ Gtk3App.toggle!
116
+ # When 3 gets captured by Gtk3App's main menu
117
+ end
118
+ end
110
119
 
111
120
  status(@ready)
112
121
  end
@@ -157,6 +166,7 @@ class ClipboardManager
157
166
  text = request_text
158
167
  @previous = text
159
168
  @running.active = !@running.active?
169
+ ClipboardManager.kill_espeak unless @running.active?
160
170
  end
161
171
 
162
172
  def request_text
@@ -226,11 +236,16 @@ class ClipboardManager
226
236
  status(@nope)
227
237
  end
228
238
 
229
- ESPEAK = IO.popen(CONFIG[:Espeak], 'w')
230
- ESPEAK.puts # b/c :-???
231
- Gtk3App.finalize{ESPEAK.close}
239
+ def ClipboardManager.kill_espeak
240
+ espeak = CONFIG[:Espeak].split.first
241
+ system "killall --quiet #{espeak}"
242
+ end
243
+ Gtk3App.finalize{ClipboardManager.kill_espeak}
232
244
  def espeak(text)
233
- Rafini.thread_bang!{ESPEAK.puts text.strip}
245
+ Rafini.thread_bang! do
246
+ ClipboardManager.kill_espeak
247
+ IO.popen(CONFIG[:Espeak], 'w'){_1.puts text.strip}
248
+ end
234
249
  end
235
250
 
236
251
  def open(text)
@@ -28,7 +28,7 @@ class ClipboardManager
28
28
  "xdg-open 'https://en.wiktionary.org/wiki/$1'",
29
29
  ],
30
30
  url: ['^https?://\w[\-\+\.\w]*(\.\w+)(:\d+)?(/\S*)?$', :open, true],
31
- espeak: ['.{80,}', :espeak, true],
31
+ espeak: ['.{40,}', :espeak, true],
32
32
  },
33
33
 
34
34
  StatusTimeOut: 3,
@@ -41,7 +41,7 @@ class ClipboardManager
41
41
  IsPwd: is_pwd,
42
42
 
43
43
  # The text-to-speech needs to be able to receive text from stdin
44
- Espeak: 'espeak',
44
+ Espeak: 'espeak -s 180 --stdin',
45
45
 
46
46
  Working: "#{UserSpace::XDG['data']}/gtk3app/clipboardmanager/working.png",
47
47
  Ok: "#{UserSpace::XDG['data']}/gtk3app/clipboardmanager/ok.png",
@@ -120,7 +120,7 @@ class ClipboardManager
120
120
 
121
121
  # Toggle's app-menu item.
122
122
  # Application MAY modify :TOGGLE for language.
123
- TOGGLE: [label: 'Toggle'],
123
+ TOGGLE: [label: 'Toggle On/Off'],
124
124
  toggle: h0,
125
125
  toggle!: [:TOGGLE, :toggle, 'activate'],
126
126
  app_menu: {
@@ -12,7 +12,7 @@ class ClipboardManager
12
12
  --notoggle \t Minime wont toggle decorated and keep above
13
13
  --notdecorated\t Dont decorate window
14
14
  HELP
15
- VERSION = '4.1.230115'
15
+ VERSION = '4.2.230117'
16
16
 
17
17
 
18
18
  def self.run
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clipboard_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.230115
4
+ version: 4.2.230117
5
5
  platform: ruby
6
6
  authors:
7
7
  - CarlosJHR64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-15 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3app