19 Jun 2017, 18:23
Ca ne me servira pas mais j'ai trouvé ce script qui je pense est compatible recalbox.
Pour ceux qui laisse leur pi allumé H/24 :
#!/bin/bash
POLL="ls -l /dev/input/"
CUR=$($POLL)
LST=$($POLL)
finish()
{
exit
}
trap finish SIGINT
while :; do
if (( ${#CUR} > ${#LST} )); then
# pause and steal active source
$(echo "tx 14:44:46" | cec-client -s -d 1)
$(echo "as" | cec-client -s -d 1)
fi
LST=$CUR
CUR=$($POLL)
sleep 1
done