quick change audio output 2

Reasonable success.

further down the thread (on February 1st, 2012, 02:00 AM) dar270785 gives a script for dynamically selecting the output, according to the same method I was working out in my previous post.

(s)he doesn't use grep for this, but the principle's the same. I tried following those instructions, but although the script works when run manually, it doesn't do so automagically when the HDMI cable is plugged in.

I guess that's what the whole /etc/udev/rules.d/ bit is about, but I'm not sure what's going wrong for me. I made sure the script names were right and rebooted the lappy, but no effect.

So in the meantime I've settled for a script that's kept in /usr/local/bin (called audioselect.sh), and I've tied it to an F9 key shortcut.

I'm a bit bothered by the fact that it doesn't actually just toggle the output. If I can't get it to autodetect the HDMI device, and have to press a button, I'd like the button to do a straight swap. As it is it will ONLY swap if there's been a change in state since it was last run. So if I wanted to toggle back to laptop sound with the HDMI cable plugged in, I couldn't. I'd have to unplug the cable, F9 then re-plug the cable. I guess this is obscure enough that I don't have to worry about it, but on principle it'll annoy me.

Also, I need to look at the script again and explore that notification function, it's pretty neat! Another day for that I think. [edit - notify-send]

Comments

Popular posts from this blog

no sound in Papers Please

pdf to png/jpg/etc

Crunchbang Changes