New answers tagged


The trick is to make the speaker or headphone state follow the state of the master channel depending on if you have the headphones plugged in or not. This script does it for me on my ancient Dell Latitude laptop: #!/bin/bash amixer -q sset Master toggle MASTER_STATE=`amixer get Master | awk -F"dB] " 'NR == 5 {print $2;}'` HEADPHONES_PLUGGED=`amixer ...

Top 50 recent answers are included