Switching between Speakers and Headphones
#1
I have written a couple of simple scripts that can switch the speakers and headphones and thought I share it. Pretty straightforward though, but maybe it can be updated to be written in one script and can detect whether the auxiliary port is connected to an auxiliary cable or not.

headphones.sh
Code:
#!/bin/sh
amixer -c 0 set 'Headphone' unmute
amixer -c 0 set 'Line Out' mute

speakers.sh
Code:
#!/bin/sh
amixer -c 0 set 'Headphone' mute
amixer -c 0 set 'Line Out' unmute


Messages In This Thread
Switching between Speakers and Headphones - by DrewTechs - 07-20-2020, 04:10 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)