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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/amixer2019.rb +4 -3
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a8c6228d1f41ec53fbb3d038b7e744c85c066c1b3392c3ea98ce4b4991ef537c
|
|
4
|
+
data.tar.gz: 9b3f6542dd7ca2bd6f008e4db911299c0a57ad6a753ccc3d085bf52ff212b006
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed870605a9299b43b5f14c0c80ddded5fccbb236fd6a65c9d4c7a09d6e7b72002b53b5d744babcc61533fb4d2365a2e4b9dd5a9a603dc55c7fd52c503afc18fa
|
|
7
|
+
data.tar.gz: ca10feff0ff5e1e3ea527032d2104ff8dab4f15427af5f73251c84efae3a5165e6bb1a717147ede23a562373f7b173621ae2cd737fbc864a71dcf9bed8a9f99f
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/amixer2019.rb
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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:
|
|
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.
|
|
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
|