11-12-2020, 04:56 PM
You could have the script accept an input argument.
myscript.sh Mp3
myscript.sh Radio
In the script $1 represents the first input argument. You would use the command below instead of mpc load Mp3
mpc load $1
Button 1 CMD field = /home/pi/myscript.sh,Mp3
Button 2 CMD field = /home/pi/myscript.sh,Radio
myscript.sh Mp3
myscript.sh Radio
In the script $1 represents the first input argument. You would use the command below instead of mpc load Mp3
mpc load $1
Button 1 CMD field = /home/pi/myscript.sh,Mp3
Button 2 CMD field = /home/pi/myscript.sh,Radio