To activate the volume controls on the keyboard, I had to open
~/.config/openbox/trisquel-mini-rc.xml
look for
and add the contents of attachment1 above that line:
~/.local/share/volume.sh toggle
~/.local/share/volume.sh up 5%
~/.local/share/volume.sh down 5%
then, create a file named ~/.local/share/volume.sh:
touch ~/.local/share/volume.sh
chmod +x ~/.local/share/volume.sh
open the file and put the following:
#!/bin/bash
# Check that amixer exists or exit
[[ -z `which amixer` ]] && exit 1
case "$1" in
[uU] | [uU][pP])
echo "Volume up by $2";
amixer set Master "$2"+;
;;
[dD] | [dD][oO][wW][nN])
echo "Volume up by $2";
amixer set Master "$2"-;
;;
[mM] | [mM][uU][tT][eE])
echo "Muting";
amixer set Master mute;
;;
[uU][nN] | [uU][nN][mM][uU][tT][eE])
echo "Unmuting all";
for i in {Master,Headphone,PCM,Speaker}; do
amixer set "$i" unmute;
done;
;;
[tT] | [tT][oO][gG][gG][lL][eE])
echo "Toggling all according to Master";
# Get the status of the Master control
M=$(amixer get Master | grep 'dB.*\[o' | awk '{print $NF}' | tr -d '[]');
for i in {Master,Headphone,PCM,Speaker}; do
# If the master is on, mute it (set on)
if [[ $M == "on" ]]; then
amixer set "$i" mute;
# If the master is off, unmute it (set off)
elif [[ $M == "off" ]]; then
amixer set "$i" unmute;
fi;
done;
;;
esac
then run openbox --reconfigure
*_and I would like to see these changes in the next release of Trisquel!_* please.