Hello Awesome people, I have a setup at home where I have my desktop connected to a monitor and speakers, and also connected to my tv which has its own speakers. I'd like to have it so that when I move a window playing sound like a youtube tab or mplayer from my monitor to my tv, the sound also switches from my desktop speakers to my monitor speakers. Is there an easy way to do this?
My idea was to create a timer that would call `pacmd list-sink-inputs` to get the current things that are playing sound and build a table that maps pid to sink input id (the thing playing sound) and sink id (the set of speakers it's currently playing sound out of) and every few seconds checks all the awesome clients to make sure that their sink id matched the screen that they were on. If they didn't make, called `pacmd move-sink-input` to move their sink id to the appropriate on. The problem I'm running into is that I'm using the pid to match pulseaudio sink inputs with awesome clients, but for Chrome tabs for example, different clients will have the same pid but will be on different screens. Is there a better id I could match on? I was considering using the X window id, but I didn't know how to get that value from pulseaudio's sink inputs. .Carlo
