amixer2019 0.1.0 → 0.1.1

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: 5dfdb9a4e50a13b93c71f65cf4d3c76a616d508dafa0c422c5b918a2b24d20e9
4
- data.tar.gz: c9de4099a34ec821f4a6bc9c738031997a07a340cbab679a2fd8001131e3d1b7
3
+ metadata.gz: a8c6228d1f41ec53fbb3d038b7e744c85c066c1b3392c3ea98ce4b4991ef537c
4
+ data.tar.gz: 9b3f6542dd7ca2bd6f008e4db911299c0a57ad6a753ccc3d085bf52ff212b006
5
5
  SHA512:
6
- metadata.gz: 26d66f01e2b2f8e39b4419bfcff9c1b72524500eebd519aac153161d707a97f141439bc97330a3cc73fd0f284c97195beee20905435d7801e20b359180801fc7
7
- data.tar.gz: '085ab40ef1498ca606d51f05f73ac563169a88bfdf00380c4422a643250546d04bcc86596ddbb5ed88adff495a4296b6eb0a29291051309e7c7608cb82535484'
6
+ metadata.gz: ed870605a9299b43b5f14c0c80ddded5fccbb236fd6a65c9d4c7a09d6e7b72002b53b5d744babcc61533fb4d2365a2e4b9dd5a9a603dc55c7fd52c503afc18fa
7
+ data.tar.gz: ca10feff0ff5e1e3ea527032d2104ff8dab4f15427af5f73251c84efae3a5165e6bb1a717147ede23a562373f7b173621ae2cd737fbc864a71dcf9bed8a9f99f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -6,8 +6,9 @@
6
6
 
7
7
  class AMixer2019
8
8
 
9
- def initialize(notch: 5, fade_interval: 0.15)
9
+ def initialize(notch: 5, fade_interval: 0.15, debug: false)
10
10
 
11
+ @debug = debug
11
12
  @notch, @fade_interval = notch, fade_interval
12
13
  @control = `amixer scontrols`[/(?<=')[^']+/]
13
14
  query(`amixer get '#{@control}'`)
@@ -60,11 +61,11 @@ class AMixer2019
60
61
 
61
62
  def query(r)
62
63
 
63
- h = r.match(/(?<volume>\d+)%\] \[(?<toggle>on|off)\]/)
64
+ puts 'r: ' + r.inspect if @debug
65
+ h = r.match(/(?<volume>\d+)%\] .*\[(?<toggle>on|off)\]/)
64
66
  @volume = h[:volume].to_i
65
67
  @muted = h[:toggle] == 'off'
66
68
 
67
69
  end
68
70
 
69
71
  end
70
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amixer2019
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  xrnDkXQ5UbsMkpilAR42JzG+WOWh62UFBl2t20injcEiEa+yyKBuBqK8JRjUfoZi
36
36
  YQVkc3AYB+yLRWF745GX8hKx
37
37
  -----END CERTIFICATE-----
38
- date: 2019-02-12 00:00:00.000000000 Z
38
+ date: 2020-01-15 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
- rubygems_version: 3.0.2
66
+ rubygems_version: 3.0.3
67
67
  signing_key:
68
68
  specification_version: 4
69
69
  summary: 'A wrapper around the command-line program amixer. #amixer #alsamixer #raspberrypi'
metadata.gz.sig CHANGED
Binary file