This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/pulse-sink

21 lines
507 B
Bash
Executable File

#!/bin/bash
opts="Fone\nSpeaker\nHDMI"
out=$(echo -e $opts | rofi -p "Saida:" -no-custom -only-matching -dmenu)
if [ "$out" == "HDMI" ]
then
pacmd set-card-profile 0 output:hdmi-stereo+input:analog-stereo
elif [ "$out" == "Speaker" ] || [ "$out" == "Fone" ]
then
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo
if [ "$out" == "Speaker" ]
then
pacmd set-sink-port @DEFAULT_SINK@ analog-output-speaker
else
pacmd set-sink-port @DEFAULT_SINK@ analog-output-headphones
fi
fi