8 lines
319 B
Bash
Executable file
8 lines
319 B
Bash
Executable file
#!/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
|