From 0cc40440ff8d96a809c87b810d3f7e9ef9586fdb Mon Sep 17 00:00:00 2001 From: Matt Parlette Date: Wed, 8 Jun 2016 10:33:12 -0400 Subject: [PATCH] Added tv setting to audio --- audio | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/audio b/audio index 4a34d3d..283f75b 100755 --- a/audio +++ b/audio @@ -11,7 +11,7 @@ function show_help { echo "Usage: $0 [options]" echo "Options:" echo -e "-h\tShow this help" - echo -e "-o\tSet output device (requires 'speakers' or 'headphones')" + echo -e "-o\tSet output device (requires 'speakers', 'tv', or 'headphones')" # echo -e "-s\tSet output to speakers" } @@ -95,6 +95,9 @@ while getopts "ho:" opt; do if [[ $output =~ ^(s|speakers)$ ]]; then output `pactl list short sinks | awk '/pci.*analog-stereo/ {print $2}'` fi + if [[ $output =~ ^(t|tv)$ ]]; then + output `pactl list short sinks | awk '/pci.*hdmi/ {print $2}'` + fi if [[ $output =~ ^(h|headphones)$ ]]; then # set output for analog, then digital in case one isn't present output `pactl list short sinks | awk '/usb.*Logitech/ {print $2}'`