You are not logged in.

#1 2017-12-25 11:19:05

samrob85
Member
Registered: 2017-07-23
Posts: 31

Keyboard shortcut to change audio output

I am trying to have two keyboard shortcuts which would allow me to change the default audio output between two outputs.

I can change it in terminal using:
pacmd list-sink-inputs|awk '/ pri+indargex: /{ nt $2}'|xs -n1 --replace="PLAYBACK" pacmd move-sink-input PLAYBACK 1
pacmd list-sink-inputs|awk '/ pri+indargex: /{ nt $2}'|xs -n1 --replace="PLAYBACK" pacmd move-sink-input PLAYBACK 4

For the two outputs

I tried putting this into the keyboard shortcut section in gnome but it did not work, but the key binding I used was available as when I changed the command to gnome-terminal it opened the terminal

What am I doing wrong?

Offline

#2 2017-12-25 11:28:06

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Keyboard shortcut to change audio output

I have found that gnome's keyboard shortcuts isn't great at parsing complex commands.

If nothing else works, try putting each command to a script, and executing the script via shortcuts.

Offline

Board footer

Powered by FluxBB