Sometimes I connect my laptop to my TV over HDMI to have a bigger screen. Unfortunately, it doesn't automatically switch the audio output, so I have to do that myself every single time I plug or unplug it, with either of those two, to have the sound come from where I want it to come from.
pacmd set-card-profile 0 output:hdmi-stereo-extra1
pacmd set-card-profile 0 output:analog-stereo+input:analog-stereo
Is there any way to detect if HDMI is plugged in, or at least if a change has occurred? Thanks!
Linux Mint 18.2 Xfce x64, Asus P756U