home
/
code
/
khatus.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Split workers into dedicated files
[khatus.git]
/
bin
/
khatus_sensor_volume
1
#! /bin/sh
2
3
set -e
4
5
pactl list sinks \
6
|
awk
'
7
/^
\t
Mute:/ {
8
printf("%s,",
$0
);
9
}
10
/^
\t
Volume:/ {
11
for (i=2; i<=NF; i++) printf(" %s",
$i
);
12
}'
\
13
|
awk
-v
RS
=
','
'
14
/^[
\t
]*Mute:/ {mute =
$2
}
15
/^[
\t
]*front-left:/ {left =
$4
}
16
/^[
\t
]*front-right:/ {right =
$4
}
17
END {
18
if (mute == "yes") {
19
print("x")
20
} else {
21
print("%s %s
\n
", left, right)
22
}
23
}
24
'
This page took
0.059196 seconds
and
4
git commands to generate.