mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 04:14:58 +00:00
Adding a csound script that changes audio profile
If was slow to change audio profiles from HDMI to Analog, so I created this small script that changes it acordinly with the parameter (-a to Analog, -h to HDMI). It also shows a message on screen, so I can use KDE shortcuts to make it even easier to change (Win+H or Win+A)
This commit is contained in:
parent
fe29bd3404
commit
e44afcd5a3
25
csound
Executable file
25
csound
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
while [[ $# -gt 0 ]]
|
||||||
|
do
|
||||||
|
key="$1"
|
||||||
|
|
||||||
|
case $key in
|
||||||
|
-h|--hdmi)
|
||||||
|
pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-stereo && echo "HDMI profile is active" && kdialog --passivepopup "Audio output changed to HDMI" --title="Audio profile changed" 2
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-a|--analog)
|
||||||
|
pacmd set-card-profile alsa_card.pci-0000_00_1f.3 output:analog-stereo && echo "Analog Profile is active" && kdialog --passivepopup "Audio output changed to ANALOG" --title="Audio profile changed" 2
|
||||||
|
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Choose -h (--hdmi) or -a (--analog)"
|
||||||
|
exit 3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if [[ $# -ne $1 ]]; then
|
||||||
|
echo "Choose -h (--hdmi) or -a (--analog)"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user