9 lines
319 B
Bash
9 lines
319 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
input=$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print "{\"value\": " $2 * 100 ", \"muted\": " ($3 == "[MUTED]") "}"}')
|
||
|
output=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print "{\"value\": " $2 * 100 ", \"muted\": " ($3 == "[MUTED]") "}"}')
|
||
|
|
||
|
cat << EOF
|
||
|
{"input": $input, "output": $output}
|
||
|
EOF
|