Skip to content

Commit

Permalink
Added tv setting to audio
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-parlette committed Jun 8, 2016
1 parent e9b078d commit 0cc4044
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion audio
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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}'`
Expand Down

0 comments on commit 0cc4044

Please sign in to comment.